fparith_float_add.c (317B)
1 /* Single-precision FADD round-trip. volatile int inputs -> float so a real 2 * SCVTF + FADD (single, Sd operands) is emitted. 40.0f + 2.0f = 42.0f; 3 * (int)42.0f == 42. */ 4 int test_main(void) { 5 volatile int ia = 40, ib = 2; 6 float a = (float)ia, b = (float)ib; 7 float r = a + b; 8 return (int)r == 42 ? 42 : 0; 9 }