20_data_sections_O2.c (352B)
1 /* Same surface as 11_data_sections, compiled at -O2. The optimizer 2 * may fold loads, fold the sum, or rearrange section order — the 3 * roundtrip must still preserve each .data.<name> section with the 4 * correct flags and reloc set. */ 5 6 int var_a = 1; 7 int var_b = 2; 8 long var_long = 3; 9 10 int sum_vars(void) { return var_a + var_b + (int)var_long; }