This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/37903] [4.3/4.4 Regression] wrong-code for complicated vector subscripts
- From: "mikael dot morin at tele2 dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Oct 2008 21:27:34 -0000
- Subject: [Bug fortran/37903] [4.3/4.4 Regression] wrong-code for complicated vector subscripts
- References: <bug-37903-14266@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from mikael dot morin at tele2 dot fr 2008-10-23 21:27 -------
Quickfix (understand: not regression tested):
Index: trans-array.c
===================================================================
--- trans-array.c (révision 141321)
+++ trans-array.c (copie de travail)
@@ -3380,7 +3380,7 @@
{
/* The frontend has worked out the size for us. */
loopspec[n] = ss;
- continue;
+ break;
}
if (ss->type == GFC_SS_CONSTRUCTOR)
This forces to use the array constructor's ss to setup the loop.
As it is zero-based, the upper bounds has the proper value and the array has
the proper size.
I suspect this is only hiding the problem though.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37903