https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66544
Bug ID: 66544 Summary: ICE on function with pointer result in combination with implicit none Product: gcc Version: 5.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- This code with "implicit none" : module m implicit none contains function f() result(z) procedure(f), pointer :: z end end module yields (with gfortran 5.1.1 on SUSE Linux 13.2, 64 bit) : internal compiler error: in gfc_typenode_for_spec, at fortran/trans-types.c:1064 --- Deleting "implicit none" from source : module m contains function f() result(z) implicit none procedure(f), pointer :: z end end module $ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize -c z0.f90 function f() result(z) 1 Warning: Return value 'z' of function 'f' declared at (1) not set --- With option -fimplicit-none same issue as above : $ gfortran -g -O0 -Wall ... -fimplicit-none -c z0.f90 z0.f90:3:0: internal compiler error: in gfc_typenode_for_spec, at fortran/trans-types.c:1064 function f() result(z) ^ Please submit a full bug report, with preprocessed source if appropriate.