[Bug fortran/85520] [6/7/8 Regression] Out of memory when declaring a character with len << 0
gscfq@t-online.de
gcc-bugzilla@gcc.gnu.org
Tue Apr 24 17:47:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85520
--- Comment #1 from G. Steinmetz <gscfq@t-online.de> ---
Additional test cases :
$ cat z3.f90
program p
character(-huge(1_8)/2_8) :: c(2) = ' '
print *, len(c), size(c), c
end
$ gfortran-8-20180422 -c z3.f90
f951: out of memory allocating 8 bytes after a total of 503808 bytes
$ cat z4.f90
program p
character(1000-huge(1)) :: c(2) = ' '
print *, len(c), size(c), c
end
$ gfortran-8-20180422 -c z4.f90
f951: out of memory allocating 18446744065119621032 bytes after a total of
503808 bytes
$ cat z5.f90
program p
character(1000-huge(1_8)/2) :: c(2) = ' '
print *, len(c), size(c), c
end
$ gfortran-8-20180422 -c z5.f90
f951: out of memory allocating 4008 bytes after a total of 503808 bytes
More information about the Gcc-bugs
mailing list