summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr48772.C
blob: 39c1094e8105dead824d61c399b7d4546d921613 (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
35
// { dg-do compile }
// { dg-options "-O -fnon-call-exceptions -fno-tree-ccp -fno-tree-dce" }

extern "C" void abort ();

struct A
{
  void foo ()
  {
    this->bar ();
  }
  virtual void bar ()
  {
    abort ();
  }
  ~A ()
  {
  }
};

struct B:A
{
  virtual void bar ()
  {
  }
};

int
main ()
{
  B b;
  b.foo ();
  return 0;
}