http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32412
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED Target Milestone|--- |4.6.0 --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-19 05:12:44 UTC --- Fixed in 4.6.0 and above. Note you really need to mark foo as static or use -fwhole-program to get the result you want.