iunop_chain.c (381B)
1 /* Composed unary ops: negate then complement then negate, all 32-bit, to 2 * exercise back-to-back neg/mvn with the value flowing through volatile loads. 3 * a = 41; -a = -41; ~(-41) = 40; -(40) = -40; then 82 + (-40) = 42. */ 4 int test_main(void) { 5 volatile int a = 41; 6 int x = -a; /* -41 */ 7 int y = ~x; /* 40 */ 8 int z = -y; /* -40 */ 9 return 82 + z; /* 42 */ 10 }