https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61775

            Bug ID: 61775
           Summary: Allocatable array initialized by implied-do loop array
                    constructor gives invalid memory reference
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: robert.rosenberg at nrl dot navy.mil

Created attachment 33104
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33104&action=edit
initializes allocatable array with implied-do loop array constructor

Received an 'invalid memory reference' run time error from gfortran code that
initializes an allocatable array with an implied-do loop array constructor. 
Runs fine for Intel and Cray compilers, but fails for both GNU and PGI
compilers.

        program pi
        real   , allocatable :: x(:)
        integer              :: n
        n  = 10000
        x = [ (i,i=1,n) ]
        print*,x(n)
        end

Reply via email to