This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47260] DLLEXPORT attribute requires additional capabilities to be useful
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 12 Jan 2011 09:10:48 +0000
- Subject: [Bug fortran/47260] DLLEXPORT attribute requires additional capabilities to be useful
- Auto-submitted: auto-generated
- References: <bug-47260-4@http.gcc.gnu.org/bugzilla/>
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.