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/66193] ICE for initialisation of some non-zero-sized arrays


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

--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
For integer instead of real ...
   program p
      integer :: z(2)
      z = 1.2 + [integer :: 3.5, 4.5]
      print *, z
   end

it compiles with gfortran snippet.f90
but running ./a.out prints an unexpected
           1           1

---

On the other hand, something like this with a zero-sized array ...
   program p
      integer(8) :: z(2)
      z = 1 + [ integer(8) :: [ integer(4) :: ], 1, 2 ]
   end

gives an ...
f951: internal compiler error: Segmentation fault


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