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

--- Comment #1 from G. Steinmetz <gs...@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

Reply via email to