summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/tree-ssa/pr37356.C
blob: 45b99a037b9693e8bfe16d03aa9cb908df893a15 (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
28
29
30
31
32
33
34
// PR middle-end/37356 */
// { dg-do compile }
// { dg-options "-O" }

bool foo ();
int bar ();

bool
baz (int v)
{
  return v == bar ();
}

struct A
{
  A () { baz (1) || foo (); }
};

struct B
{
  static A get () { return A (); }
  B (const int &x) { }
  B () : b (get ()) { }
  A b;
};

B c;

void
test ()
{
  int d;
  c = d;
}