http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51900
--- Comment #10 from Daniel Starke <daniel.f.starke at freenet dot de> 2012-01-20 07:41:10 UTC --- I have tested the problem with the option switches -O0, -O1, -O2, -O3, -O4, -Os and -Ofast. Only -O0 results in a 5, 6, 7 output. Turning on the options listed in the documentation activated by -O1 and -O2 in any combination (also all together) does not results in the problematic output of 0, 0, 0. I have also used -Wall to detect the issue, however the only warning this returns is main.c:3:6: warning: return type of 'main' is not 'int' [-Wmain] Compiling the test case with -O1 -flto results in the same faulty output.