This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/69514] ICE with nested array constructor


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]