This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/38914] ICE with array inquiry functions above contains in parameter expression
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jan 2009 09:11:21 -0000
- Subject: [Bug fortran/38914] ICE with array inquiry functions above contains in parameter expression
- References: <bug-38914-15620@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from tkoenig at gcc dot gnu dot org 2009-01-26 09:11 -------
(In reply to comment #2)
> the lbound should be simplified in simplify_bound even if the ARRAY argument is
> not a full array.
>
Here's a tentative patch:
Index: simplify.c
===================================================================
--- simplify.c (revision 143655)
+++ simplify.c (working copy)
@@ -2251,6 +2251,8 @@ simplify_bound (gfc_expr *array, gfc_exp
continue;
case AR_FULL:
+ case AR_SECTION:
+
/* We're done because 'as' has already been set in the
previous iteration. */
if (!ref->next)
@@ -2258,7 +2260,6 @@ simplify_bound (gfc_expr *array, gfc_exp
/* Fall through. */
- case AR_SECTION:
case AR_UNKNOWN:
return NULL;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38914