--- gcc/fortran/trans-array.c.orig 2006-08-03 22:49:52 +0300 +++ gcc/fortran/trans-array.c 2006-08-03 22:50:00 +0300 @@ -4485,7 +4485,14 @@ /* Get the descriptor type. */ type = TREE_TYPE (sym->backend_decl); - gcc_assert (GFC_DESCRIPTOR_TYPE_P (type)); + if (!GFC_DESCRIPTOR_TYPE_P (type)) + { + /* If the backend_decl is not a descriptor, we must have a pointer + to one. */ + descriptor = build_fold_indirect_ref (sym->backend_decl); + type = TREE_TYPE (descriptor); + gcc_assert (GFC_DESCRIPTOR_TYPE_P (type)); + } /* NULLIFY the data pointer. */ gfc_conv_descriptor_data_set (&fnblock, descriptor, null_pointer_node);