Debian Codegraph @

gcc/testsuite/g++.dg/expr/for9.C

raw
1 // PR c++/118822
2 // { dg-do compile }
3
4 struct A { A (); ~A (); };
5 bool baz ();
6
7 void
8 foo ()
9 {
10 while (bool x = baz ())
11 {
12 lab:;
13 A a;
14 }
15 }
16
17 void
18 bar ()
19 {
20 for (bool y = baz (); bool x = baz (); y |= x)
21 {
22 lab:;
23 A a;
24 }
25 }