This is an interesting one... Compiling the code below at all common optimization levels, gcc r139046 generates code that prints hello, as does 4.3.1. Pre-4.3 versions of gcc emit code that prints nothing. I'm pretty sure that the older versions are correct.
#include <stdio.h> int func_72 (void); int func_72 (void) { printf ("hello\n"); return 0; } void func_58 (unsigned short p_65); void func_58 (unsigned short p_65) { char g_99 = -1; (p_65 != g_99) || (func_72 ()); } int main (void) { func_58 (-1); return 0; } -- Summary: possible integer codegen bug Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: regehr at cs dot utah dot edu GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37103