[Bug fortran/69514] ICE with nested array constructor
gerhard.steinmetz.fortran@t-online.de
gcc-bugzilla@gcc.gnu.org
Tue Feb 2 18:48:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69514
--- Comment #2 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Test case from comment 0 can be reduced to e.g.
$ cat z3.f90
program p
real, parameter :: w(2) = [real :: 0, 3.0*[real :: 2]]
print *, w
end program
$ gfortran-6 -c z3.f90
f951: internal compiler error: Segmentation fault
Another variation is to revers operands.
As known, this compiles and runs, but gives WRONG results.
$ cat z4.f90
program p
real, parameter :: w(2) = [real :: 0, [real :: 2]*3.0]
print *, w
end program
$ gfortran-6 z4.f90
$ a.out
0.00000000 0.00000000
Analogous for other operations, other intrinsic types, other
combinations - look up especially in attached files of pr66193.
Some variants segfault, some compile and run silently wrong.
This theme is known from pr66193.
More information about the Gcc-bugs
mailing list