https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117264
--- Comment #2 from Vladimir Terzi <vterzi1996 at gmail dot com> --- (In reply to anlauf from comment #1) > Confirmed up to current trunk. > > As a workaround, you may try the result clause on function f, e.g.: > > function f() result(r) > class(t), allocatable :: r > r=tt() > end But this workaround doesn't seem to change anything in my version of gfortran. I'm getting the same segfault.