https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99138
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> --- The following fails the same way: module m interface module function f() class(*), allocatable :: f(:) end end interface contains module function f(x) class(*), allocatable :: f(:) end function end Except that the fail is now in resolve.c, but again when accessing 'CLASS_DATA (sym)->'.