Compiler version and platform:
Intel(R) C Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0.0.098 Build 20160721
$ icc -O0 small.c; ./a.out $ $ icc -O1 small.c $ timeout -s 9 10 ./a.out Killed $ $ cat small.c volatile int b = 1; static int c; short fn1 () { if (1) return b; return c; } int fn2 () { while (1) if (fn1 ()) return 2; } int main () { fn2 (); return 0; } $