https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66544
--- Comment #6 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- When running several private scripts, there was a difference between some scripts including option -fimplicit-none, and some others that didn't. Reducing and simplifying gave example z0.f90 from comment 1. Explicitly including "implicit none" into source then gives first example in comment 0. > Btw, I don't fully understand why "implicit none" should make any > difference here. Me too. > There is also the very closely related PR54107, which is fixed already. Now interestingly, compiling examples from ./gcc/testsuite/gfortran.dg/ with an additional -fimplicit-none shows the same error message as above for these sources : automatic_char_len_1.f90 data_value_1.f90 init_flag_9.f90 recursive_interface_1.f90 recursive_interface_2.f90 $ gfortran-6 --version GNU Fortran (SUSE Linux) 6.0.0 20160121 (experimental) [trunk revision 232670] $ gfortran-6 -c recursive_interface_1.f90 # ok $ gfortran-6 -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