This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/51663] New: LTO does not reclaim comdat-local statics
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 23 Dec 2011 11:23:22 +0000
- Subject: [Bug lto/51663] New: LTO does not reclaim comdat-local statics
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51663
Bug #: 51663
Summary: LTO does not reclaim comdat-local statics
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rguenth@gcc.gnu.org
CC: hubicka@gcc.gnu.org
struct T;
struct C
{
typedef ::T T;
virtual void E();
static T *m ()
{
static T *d;
return d;
}
};
int
fn ()
{
C::m ();
}
int main() {}
The C++ frontend with -fwhole-program reclaims C::m::d, but LTO using
the linker plugin does not. See PR51650 comment #15 and #16 for some
analysis.