https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102331
--- Comment #3 from anlauf at gcc dot gnu.org --- (In reply to kargl from comment #2) > The following patch fixes the problem. It has not been regression tested. This restores the error, but for CLASS I now get: pr102331.f90:2:3: 2 | allocatable :: f | 1 Error: Unclassifiable statement at (1) pr102331.f90:1:0: 1 | class(t) function f() | Error: The type for function 'f' at (1) is not accessible while the error message for line 2 does not show up for TYPE. Maybe there are a few more places that need fixing. (Not only the obvious one after the second hunk for parse.c).