This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/37903] [4.3/4.4 Regression] wrong-code for complicated vector subscripts



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]