1 /* { dg-do run } */ 2 /* { dg-options "-O2" } */ 3 4 int bbb = 0; 5 aaa(void)6int __attribute__((noinline,noclone)) aaa(void) 7 { 8 ++bbb; 9 return 0; 10 } 11 ccc(void)12int __attribute__((noinline,noclone)) ccc(void) 13 { 14 int ddd; 15 /* bbb == 0 */ 16 if (aaa()) 17 return bbb; 18 19 /* bbb == 1 */ 20 ddd = bbb; 21 /* bbb == ddd == 1 */ 22 if (aaa ()) 23 return 0; 24 /* bbb == 2, ddd == 1 */ 25 26 return ddd; 27 } 28 main(void)29int main(void) 30 { 31 if (ccc() != 1) 32 __builtin_abort(); 33 return 0; 34 } 35 36