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

            Bug ID: 71745
           Summary: upper array bound huge(i) on 32-bit systems
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tkoenig at gcc dot gnu.org
  Target Milestone: ---

This is with a 4.8 compiler (I don't have a working -m32 around
for trunk at the moment), but I think the error applies as well.

ig25@linux-fd1f:/tmp> /usr/bin/gfortran -m32 foo.f90
ig25@linux-fd1f:/tmp> ./a.out

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0xF76A224E
#1  0xF76A135E
#2  0xF779AE4F
#3  0x80485A1 in MAIN__ at foo.f90:?
Speicherzugriffsfehler
ig25@linux-fd1f:/tmp> cat foo.f90
program main
  integer :: i
  integer, dimension(huge(i)-2:huge(i)) :: a
  a = 2
  print *,a, size(a)
end program main

Reply via email to