summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/torture/pr45934.C
blob: f43964107c2e492341a2eaee370af2b773e7ab9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { dg-do run } */

extern "C" void abort ();

struct B *b;

struct B
{
  virtual void f () { }
  ~B() { b->f(); }
};

struct D : public B
{
  virtual void f () { abort (); }
};

int main ()
{
  D d;
  b = &d;
  return 0;
}