https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88980
Bug ID: 88980
Summary: [9 regression] segfault on allocatable string member
assignment
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: antony at cosmologist dot info
Target Milestone: ---
This code gives seg fault in 9.0.0 20181010 and 9.0.0 20190103, OK in 8.2.1:
(same with P pointer or allocatable)
program tester
call gbug
contains
subroutine gbug
type TNameValue
character(LEN=:), allocatable :: Name
end type TNameValue
type TNameValue_pointer
Type(TNameValue), allocatable :: P
end type TNameValue_pointer
Type TType
type(TNameValue_pointer), dimension(:), allocatable :: Items
end type TType
Type(TType) T
allocate(T%Items(2))
allocate(T%Items(2)%P)
T%Items(2)%P%Name = 'test'
end subroutine gbug
end program tester