Debian Codegraph @

gcc/testsuite/g++.dg/pr103530.C

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O -fharden-compares -Wno-c++11-extensions" } */
3
4 enum E:bool
5 { E0, E1 };
6
7 int x;
8
9 E
10 baz (E rtt)
11 {
12 return rtt == E0 ? E1 : E0;
13 }
14
15 bool bar ();
16
17 void
18 foo (E)
19 {
20 E a = x ? E1 : E0;
21 if (bar ())
22 if (bar ())
23 {
24 E b = baz (a);
25 foo (b);
26 }
27 }