https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44348
--- Comment #11 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- As a side note, with a slightly modified example b from comment 3 and $ gfortran --version GNU Fortran (SUSE Linux) 5.2.1 20151008 [gcc-5-branch revision 228597] $ cat pr44348_c3b_modified.f90 FUNCTION f2() RESULT(g) real :: g contains real FUNCTION g() END FUNCTION END FUNCTION $ gfortran -g -O0 -Wall -fcheck=all pr44348_c3b_modified.f90 pr44348_c3b_modified.f90:4.17: real FUNCTION g() 1 pr44348_c3b_modified.f90:1.23: FUNCTION f2() RESULT(g) 2 Error: Procedure 'g' at (1) has an explicit interface and must not have attributes declared at (2) f951: internal compiler error: Segmentation fault --- With gfortran 4.9.0 : $ gfortran-4.9 -g -O0 -Wall -fcheck=all pr44348_c3b_modified.f90 pr44348_c3b_modified.f90:4.17: real FUNCTION g() 1 pr44348_c3b_modified.f90:1.23: FUNCTION f2() RESULT(g) 2 Error: Procedure 'g' at (1) has an explicit interface and must not have attributes declared at (2) pr44348_c3b_modified.f90:4.19: real FUNCTION g() 1 Error: Symbol 'g' at (1) already has basic type of REAL pr44348_c3b_modified.f90:6.3: END FUNCTION 1 Error: Expecting END PROGRAM statement at (1)