[Bug lto/51663] LTO does not reclaim comdat-local statics

2012-03-25 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51663 --- Comment #8 from Jan Hubicka 2012-03-25 13:50:39 UTC --- The inconsistency should be solved. The question however is what kind of behaviour we want at -O0 from LTO. It seems to me that at -O0 the LTO/non-LTO output should be as close as possi

[Bug lto/51663] LTO does not reclaim comdat-local statics

2012-03-25 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51663 --- Comment #7 from Jan Hubicka 2012-03-25 13:28:36 UTC --- Author: hubicka Date: Sun Mar 25 13:28:32 2012 New Revision: 185777 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185777 Log: PR lto/51663 * varpool.c (varpool_finalize_

[Bug lto/51663] LTO does not reclaim comdat-local statics

2012-03-24 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51663 --- Comment #6 from Jan Hubicka 2012-03-24 21:39:16 UTC --- OK, this should regularize the situation somewhat. We handle the -O0/-fno-toplevel-reorder semantics early at finalization time and thus we don't care about effect of -fwhole-program and

[Bug lto/51663] LTO does not reclaim comdat-local statics

2012-03-24 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51663 --- Comment #5 from Jan Hubicka 2012-03-24 21:07:34 UTC --- The resolution info seems to be right, unlike the aforementioned comment. d: availability:overwritable (asm: _ZZN1C1mEvE1d) needed analyzed finalized externally_visible prevailing_def_i

[Bug lto/51663] LTO does not reclaim comdat-local statics

2012-03-24 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51663 --- Comment #4 from Jan Hubicka 2012-03-24 20:59:38 UTC --- Works for me: jh@evans:/abuild/jh/trunk-3/build-inst7> /abuild/jh/trunk-install/bin/g++ -O2 t.C -flto -c jh@evans:/abuild/jh/trunk-3/build-inst7> /abuild/jh/trunk-install/bin/g++ -O2 t

[Bug lto/51663] LTO does not reclaim comdat-local statics

2012-03-20 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51663 --- Comment #3 from Jan Hubicka 2012-03-20 16:49:44 UTC --- OK, the funny inconsistency comes from the fact that we always eliminate COMDAT variables, but we keep around static variables with -fno-toplevel-reorder. -O0 imply -fno-toplevel-reorder

[Bug lto/51663] LTO does not reclaim comdat-local statics

2012-02-29 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51663 Jan Hubicka changed: What|Removed |Added Status|NEW |ASSIGNED AssignedTo|unassigned at g

[Bug lto/51663] LTO does not reclaim comdat-local statics

2012-01-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51663 Richard Guenther changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug lto/51663] LTO does not reclaim comdat-local statics

2012-01-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51663 --- Comment #1 from Richard Guenther 2012-01-04 12:49:47 UTC --- It's interesting that with a simplified testcase struct T; static T *m () { static T *d; return d; } int fn () { m (); } int main() {} The C++ frontend with -fwhole-p