http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53824
Thomas Koenig <tkoenig at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2012-07-01 Ever Confirmed|0 |1 --- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2012-07-01 16:28:49 UTC --- This looks straightforward and fixes the ICE: Index: resolve.c =================================================================== --- resolve.c (Revision 188916) +++ resolve.c (Arbeitskopie) @@ -7325,8 +7325,8 @@ resolve_allocate_deallocate (gfc_code *code, const } } - /* Check that an allocate-object appears only once in the statement. - FIXME: Checking derived types is disabled. */ + /* Check that an allocate-object appears only once in the statement. */ + for (p = code->ext.alloc.list; p; p = p->next) { pe = p->expr; @@ -7376,9 +7376,10 @@ resolve_allocate_deallocate (gfc_code *code, const { gfc_array_ref *par = &(pr->u.ar); gfc_array_ref *qar = &(qr->u.ar); - if (gfc_dep_compare_expr (par->start[0], - qar->start[0]) != 0) - break; + if ((par->start[0] != NULL || qar->start[0] != NULL) + && gfc_dep_compare_expr (par->start[0], + qar->start[0]) != 0) + break; } } else