This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/51663] 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: Wed, 04 Jan 2012 12:54:33 +0000
- Subject: [Bug lto/51663] LTO does not reclaim comdat-local statics
- Auto-submitted: auto-generated
- References: <bug-51663-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51663
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-01-04
Ever Confirmed|0 |1
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-04 12:54:33 UTC ---
Smaller testcase:
int m ()
{
static int d;
return d;
}
int main() {}
Does not eliminate m::d with -O0 -fwhole-program (but does, with -O1).
It does eliminate m with -O0 -fwhole-program. Similar with LTO and
the original testcase - m::d is only eliminated with optimization.
Odd inconsistency (remember, with -O0 -fwhole-program on the original
testcase m::d is eliminated).