>From Richard Maine, editor of the F2003 standard

   program stuff
     integer :: i_do
     integer :: i(101) = (/ (i_do, i_do=1,101) /)
     write (*,*) i
   end program stuff

   bug1.f90: In function 'MAIN__':
   bug1.f90:4: internal compiler error: Possible frontend bug: array 
   constructor not expanded

   Note that it works up to size 100; fails at size 101.

If we look in array.c, we find the magic number 100.

/* This parameter is the size of the largest array constructor that we
   will expand to an array constructor without iterators.
   Constructors larger than this will remain in the iterator form.  */

#define GFC_MAX_AC_EXPAND 100

-- 
           Summary: Implied do-loop in an initialization expression is
                    broken
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sgk at troutmask dot apl dot washington dot edu
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19925

Reply via email to