https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100815
Bug ID: 100815 Summary: [11 regression] Segfault assigning to scalar allocatable polymorphic LHS Product: gcc Version: 11.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: neil.n.carlson at gmail dot com Target Milestone: --- The current head of the gcc-11 branch segfaults on the assignment statement in the following program. The program runs without error with the 10.x and 9.x compilers. type, abstract :: func end type type, extends(func) :: const_func real :: c = 0.0 end type type :: func_box class(func), allocatable :: f end type type :: foo type(func_box), allocatable :: farray(:) end type type(const_func) :: f type(foo) :: this allocate(this%farray(2)) this%farray(size(this%farray))%f = f end