This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/25795] New: Proccessing the attribute externally_visible too early
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jan 2006 16:45:44 -0000
- Subject: [Bug c/25795] New: Proccessing the attribute externally_visible too early
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
extern const char *mystr; /* normally in a header */
const char *mystr __attribute__ ((externally_visible));
----------------------------------------
What happens is that we call cgraph_varpool_node from
handle_externally_visible_attribute
which adds the "second" decl (which will not exist soon). And then we do a
merge with the second and first decls and get back the first decl and then we
use the first decl always.
--
Summary: Proccessing the attribute externally_visible too early
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25795