[Bug fortran/86328] [8/9 Regression] Runtime segfault reading an allocatable class(*) object in allocate statements
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 10 15:15:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86328
--- Comment #8 from janus at gcc dot gnu.org ---
Reducing the test case slightly more:
program ptr_alloc
type :: t
class(*), allocatable :: val
end type
type :: list
type(t), dimension(:), pointer :: ll
end type
integer :: i
type(list) :: a
allocate(a%ll(1:2))
do i = 1,2
allocate(a%ll(i)%val, source=i)
end do
call rrr(a)
contains
subroutine rrr(a)
type(list), intent(in) :: a
class(*), allocatable :: c
allocate(c, source=a%ll(2)%val)
end subroutine
end
The bad stuff obviously happens in the allocate statement inside 'rrr'. The
dump for this version is a bit more compact, but still rather cryptic.
More information about the Gcc-bugs
mailing list