https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66544
janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |janus at gcc dot gnu.org Summary|ICE on function with |[F03] ICE on function with |pointer result in |procedure-pointer result in |combination with implicit |combination with implicit |none |none --- Comment #3 from janus at gcc dot gnu.org --- Note that the interface of the function 'f' is somewhat recursive/self-referential: The function f returns a pointer to a function that has the same interface as itself, namely returning a pointer to a function that has the same interface as itself, returning a pointer to a function ... (ad inf.) I'm not sure if that is allowed in any version of the Fortran standard. There are other self-reference restrictions in the language, e.g. for derived types, some of which have been loosened in F08 (see e.g. PR45516). Do you actually have a real-world problem where such a construction is necessary, or are you just trying to break the compiler? ;)