summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ipa/pr66896.C
blob: 236537a5ea0c2d949aeb4dba70dc96a7da63aa58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// PR ipa/66896
// { dg-do compile }

void f2 (void *);
void f3 ();

struct A
{
  int *a;
  A ();
  ~A () { a3 (); }
  int a1 (int * p) { if (!p) f3 (); f2 (p); }
  void a3 () { if (*a) a1 (a); }
};

struct B : A {~B () { a3 ();}};

struct F {};

struct G : F {B g;};

void foo () {G g;}