Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/init-statement3.C

raw
1 // { dg-do run { target c++17 } }
2 // Test C++17 selection statements with initializer, side-effects.
3
4 int
5 main ()
6 {
7 int g = 0;
8
9 if (g++; g > 1)
10 __builtin_abort ();
11 if (++g; g > 2)
12 __builtin_abort ();
13 if (g != 2)
14 __builtin_abort ();
15 }