The following program gives an ICE: f951: internal compiler error: in simplify_cobound, at fortran/simplify.c:2969
integer :: a[*] print *,a print *,lcobound(a), ucobound(a) end Patch (untested): Index: gcc/fortran/simplify.c =================================================================== --- gcc/fortran/simplify.c (revision 158822) +++ gcc/fortran/simplify.c (working copy) @@ -2936,6 +2936,13 @@ simplify_cobound (gfc_expr *array, gfc_e switch (ref->u.ar.type) { case AR_ELEMENT: + if (ref->next == NULL) + { + gcc_assert (ref->u.ar.as->corank > 0 + && ref->u.ar.as->rank == 0); + as = ref->u.ar.as; + goto done; + } as = NULL; continue; -- Summary: Coarrays: ICE in simplify_cobound Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43919