https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124598
Bug ID: 124598
Summary: (PDT) - ICE instantiating nested PDTs
Product: gcc
Version: 15.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
ICE with gfortran 14.3.1 and gfortran 15.2.1
Minimal example:
program test_pdt
implicit none
type t_foo
integer :: c
end type t_foo
type t_bar(n)
integer, len :: n = 1
type(t_foo) :: foo(n)
end type t_bar
type t_baz(n)
integer, len :: n = 1
type(t_bar(n)) :: bar(n)
end type t_baz
type(t_baz(n)) :: baz ! <- REMOVE THIS LINE AND THIS PROGRAM COMPILES
end program test_pdt
Compilation command:
$ gfortran -g -freport-bug -o test_pdt main.f90
main.f90:19:20:
19 | end program test_pdt
| 1
internal compiler error: Segmentation fault
Please submit a full bug report, with preprocessed source.
See <https://bugs.gentoo.org/> for instructions.
Compilers versions:
$ gfortran-14 --version
GNU Fortran (Gentoo 14.3.1_p20260213 p5) 14.3.1 20260213
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gfortran --version
GNU Fortran (Gentoo 15.2.1_p20260214 p5) 15.2.1 20260214
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.