repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2014-01-30 Alangi Derick <alangiderick@gmail.com>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
template
/
vtable1.C
blob
c5f122adbd93122ab2878cb7ee316a320754ca7f
1
// Test that vtables are set up properly for constructors and destructors
2
// of template classes.
3
4
// { dg-do run }
5
6
int r;
7
8
template <class T>
9
struct A {
10
virtual void f () { }
11
A() { f (); }
12
~A() { f (); }
13
};
14
15
struct B : public A<int> {
16
virtual void f () { ++r; }
17
};
18
19
int main ()
20
{
21
{ B b; }
22
return r;
23
}