This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/53824] ICE with ALLOCATE of coarrays
- From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 01 Jul 2012 16:28:49 +0000
- Subject: [Bug fortran/53824] ICE with ALLOCATE of coarrays
- Auto-submitted: auto-generated
- References: <bug-53824-4@http.gcc.gnu.org/bugzilla/>
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