http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47260
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org --- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-12 09:10:47 UTC --- Odd - I thought that procedures had always external linkage (TREE_PUBLIC) - unless they are internal in Fortran - or "static" in C. For variables, that's a different issue (cf. also PR 47030). The TREE_PUBLIC should be set (in this case) via gfc_create_function_decl, which calls build_function_decl. That function contains: if (!current_function_decl && !sym->attr.entry_master && !sym->attr.is_main_program) TREE_PUBLIC (fndecl) = 1; In principle, current_function_decl == NULL as it is not a contained procedure.