https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117264
--- Comment #6 from kargls at comcast dot net ---
Agree with Harald, we need to see the actual code and error.
program p
type, abstract :: t
integer :: i = 0
end type
type, extends(t) :: tt
integer :: j = 0
end type
class(t), allocatable :: o
o = f()
print '(A,I0)', 'o%i = ', o%i
contains
function f()
class(t), allocatable :: f
allocate(f, source = tt(i=42))
print '(A,I0)', 'f%i = ', f%i
end
end
% gfcx -o z a.f90 && ./z
f%i = 42
o%i = 42
% gfortran14 -o z a.f90 && ./z
f%i = 42
o%i = 42
% gfortran13 -o z a.f90 && ./z
f%i = 42
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x243c202e9 in ???
#1 0x243c1f40d in ???
#2 0x24164f2d2 in ???
#3 0x0 in ???
Segmentation fault (core dumped)
My gfortran13 is 13.2. The newer 13.3 may have this fixed.