This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Oct 2005 10:47:21 -0000
- Subject: [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Consider
static const double foo_local = 1.0;
#pragma weak foo = foo_local
with unit-at-a-time we get rid of the foo_local variable (because it is unused
apart form the weak decl). This is a regression from 4.0 where we correctly
mark foo_local as referenced.
This breaks building Xorg. rth fixed it for 4.0, somehow the bug came back.
--
Summary: [4.1 Regression] #pragma weak foo = bar no longer
causes bar to be referenced
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295