projects
/
platform
/
upstream
/
gcc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
re PR c++/46626 (simple use of virtual methods causes pure virtual method call in...
[platform/upstream/gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-base4.C
1
// PR c++/46626
2
// { dg-do run }
3
// { dg-options "-std=c++0x" }
4
5
struct A
6
{
7
virtual void f () = 0;
8
virtual ~A () { }
9
};
10
11
struct B : A
12
{
13
virtual void f () { }
14
};
15
16
static void
17
foo (A *a)
18
{
19
a->f ();
20
}
21
22
int
23
main ()
24
{
25
B b;
26
foo (&b);
27
return 0;
28
}