aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/torture/PR58294.C
blob: e1fb95ae23dc49f4361fa9a6e8c536da1f2b38b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do compile }
struct A {
  virtual ~A();
  virtual void m_fn1() { delete this; }
  void m_fn2() { m_fn1(); }
};

struct B {
  A *pi_;
  B() { pi_->m_fn2(); }
};
struct C {
  B pn;
};
void _setjmp();
int png_decode() {
  _setjmp();
  C a;
  return 0;
}