Debian Codegraph @

gcc/testsuite/g++.dg/opt/pr17902.C

raw
1 /* { dg-options "-O3" } */
2 /* { dg-do compile } */
3
4 void foo();
5 struct A { ~A(){ foo(); } };
6 struct B { A a; };
7 void bar()
8 {
9 A a;
10 bool b = false;
11 int i, j;
12
13
14 for (j=0; j<i; j++)
15 {
16 if (i) b=true;
17 if (j && i) foo();
18 if (j && i) i++;
19 }
20
21
22 for (j=0; j<i; j++)
23 if ( !j || (j==1 && b && i) )
24 B x;
25 }
26