------- Comment #3 from kargl at gcc dot gnu dot org  2009-04-15 13:57 -------
(In reply to comment #2)
> not a duplicate of PR28105. The allocate is fine (on an x86_64).
> 

Actually, the entire program is fine.  But, it does not do
what you expected!  Try using your allocated array in something
other than SIZE().

INTEGER*8 :: N
INTEGER :: M
INTEGER, DIMENSION(:), ALLOCATABLE :: data
N=2_8**32
m = n
write(6,*) N, m
ALLOCATE(data(N))
write(6,*) SIZE(data,1)
data(1) = 1
ENDREMOVE:kargl[53] gfc4x -o z -fbounds-check d.f90
REMOVE:kargl[54] ./z
           4294967296           0
           0
At line 9 of file d.f90
Fortran runtime error: Array reference out of bounds for array 'data', upper
bound of dimension 1 exceeded (1 > 0)


-- 


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

Reply via email to