This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/69514] ICE with nested array constructor
- From: "gerhard dot steinmetz dot fortran at t-online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 02 Feb 2016 18:48:09 +0000
- Subject: [Bug fortran/69514] ICE with nested array constructor
- Auto-submitted: auto-generated
- References: <bug-69514-4 at http dot gcc dot gnu dot org/bugzilla/>
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.