aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr103530.C
blob: c1d2059542ba3da27ca8ffdebaa5b952e41da735 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* { dg-do compile } */
/* { dg-options "-O -fharden-compares -Wno-c++11-extensions" } */

enum E:bool
{ E0, E1 };

int x;

E
baz (E rtt)
{
  return rtt == E0 ? E1 : E0;
}

bool bar ();

void
foo (E)
{
  E a = x ? E1 : E0;
  if (bar ())
    if (bar ())
      {
	E b = baz (a);
	foo (b);
      }
}