summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/opt/eh1.C
blob: 63a4d2ef35f2427f9612c64410023dfe92d0df12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// PR middle-end/14477
// { dg-do compile }
// { dg-options "-O2 -fno-default-inline" }

struct A
{
  A();
};

struct B
{
  B(const A*);
};

struct C
{
  B b;
  C(int) : b(new A) {}
};

C c(0);