ctl_shortcircuit_or.c (382B)
1 /* Short-circuit || : the second operand is skipped when the first is true, 2 * implemented with a conditional branch to the taken block. volatile operands 3 * keep both sub-conditions real so the skip branch round-trips. First true => 4 * r = 42. Exit code 42. */ 5 int test_main(void) { 6 volatile int a = 1, b = 0; 7 int r = 0; 8 if (a != 0 || b != 0) { 9 r = 42; 10 } 11 return r; 12 }