http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57075
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-04-26 10:54:45 UTC --- Ok, I think I reduced this issue to this: /* PR tree-optimization/57075 */ /* { dg-do compile } */ /* { dg-options "-O2" } */ extern int baz (void) __attribute__ ((returns_twice)); int __attribute__ ((__leaf__)) foo (void) { return __builtin_printf ("$"); } void bar () { foo (); baz (); }