https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117264
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |13.3.0
--- Comment #9 from anlauf at gcc dot gnu.org ---
After some search, I found a gfortran 13.3.0 (openSUSE 15.5, r13-8781),
that fails also for
program p
type,abstract::t
end type t
type,extends(t)::tt
end type tt
class(t),allocatable::o
o=f()
contains
function f() result(r) ! works
class(t), allocatable :: r
r=tt()
end
end
the same as for the example in comment#0.
Note that it works with 12.3.0 and 12.4.1, 13.3.1 (at r13-9145),
14.2.1 (at r14-10831), and 15-trunk. It looks like a temporary regression.
Can you update your compiler installation?