http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46228
--- Comment #7 from Jan Hubicka <hubicka at gcc dot gnu.org> 2010-10-30 15:41:11 UTC --- We predict main() as executed once, not cold, so code inside loop is inlined for speed at -O1/-O2/-O3, but this testcase is compiled with -Os. This seems like usual problem with comdat functions being possibly shared with other compilation units. I will check how -fwhole-program behaves and if I can do something with the heruistics here.