https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66544
--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Originally not the above z0.f90, but this code was thought as test case : $ cat z0.f90 module m contains function f() result(z) procedure(f), pointer :: z end end module $ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize -fimplicit-none -c z0.f90 But anyway, the result is the same.