https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66544
--- Comment #9 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Frankly speaking, it's difficile. Smells more invalid than valid. As a side note, I do not have any production code using a contruct similar to that in comment 0 or in recursive_interface_*. Still affects some examples from testsuite/gfortran.dg : - data_value_1.f90 - recursive_interface_1.f90 - recursive_interface_2.f90 $ gfortran-7-20161204 -c recursive_interface_1.f90 $ gfortran-7-20161204 -fimplicit-none -c recursive_interface_1.f90 recursive_interface_1.f90:16:0: function baz() result(r3) internal compiler error: in gfc_typenode_for_spec, at fortran/trans-types.c:1064 0x7c7b83 gfc_typenode_for_spec(gfc_typespec*, bool) ../../gcc/fortran/trans-types.c:1064 0x7c5c03 gfc_sym_type(gfc_symbol*) ../../gcc/fortran/trans-types.c:2167 0x7c670b gfc_get_function_type(gfc_symbol*) ../../gcc/fortran/trans-types.c:3030 0x7c68bc gfc_get_function_type(gfc_symbol*) ../../gcc/fortran/trans-types.c:3023 0x75130f build_function_decl ../../gcc/fortran/trans-decl.c:2157 0x75674b gfc_create_function_decl(gfc_namespace*, bool) ../../gcc/fortran/trans-decl.c:2833 0x733137 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2149 0x6e72fd translate_all_program_units ../../gcc/fortran/parse.c:6025 0x6e72fd gfc_parse_file() ../../gcc/fortran/parse.c:6238 0x72b182 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202