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

            Bug ID: 121480
           Summary: ICE on assigning to polymorphic component with
                    additional nesting
           Product: gcc
           Version: 15.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: damian at archaeologic dot codes
  Target Milestone: ---

% cat gfortran-issue.f90 
implicit none

type, abstract :: test_t
end type

type, extends(test_t) :: foo_test_t
end type

type test_fixture_t
  class(test_t), allocatable :: test_
end type

type test_harness_t
  type(test_fixture_t), allocatable :: test_fixture_(:)
end type

type(test_harness_t) test_harness

test_harness%test_fixture_ = [test_fixture_t(foo_test_t())]

end
rouson@rouson-m73 testbay % gfortran gfortran-issue.f90 
gfortran-issue.f90:19:59:

   19 | test_harness%test_fixture_ = [test_fixture_t(foo_test_t())]
      |                                                           1
internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.cc:1642
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://github.com/Homebrew/homebrew-core/issues> for instructions.
rouson@rouson-m73 testbay % gfortran --version
GNU Fortran (Homebrew GCC 15.1.0) 15.1.0

Reply via email to