[Bug fortran/103283] ICE in gfc_trans_array_constructor_subarray, at fortran/trans-array.c:1972

anlauf at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Nov 30 21:41:40 GMT 2021


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

--- Comment #3 from anlauf at gcc dot gnu.org ---
There's more to it:

program p
  type t
     integer :: a(1) = 2
  end type
  type(t), parameter :: x(1) = t(3)
  integer, parameter :: k(*) = x(1)%a
end

This fails with:

pr103283-z1.f90:6:28:

    6 |   integer, parameter :: k(*) = x(1)%a
      |                            1
Error: Cannot initialize implied-shape array at (1) with scalar

Funny.


More information about the Gcc-bugs mailing list