aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-base4.C
blob: ab664394e5e4447bdd137ccdab54f43ebcc81291 (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
// PR c++/46626
// { dg-do run { target c++11 } }

struct A
{
  virtual void f () = 0;
  virtual ~A () { }
};

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

static void
foo (A *a)
{
  a->f ();
}

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