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
2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.pt
/
instantiate4.C
blob
8bbbd5bafebb766dbc8a69e849a215c2e63816aa
1
// { dg-do link }
2
// { dg-options "-frepo -Werror" }
3
// Build then link:
4
5
6
// Submitted by Melissa O'Neill <oneill@cs.sfu.ca>
7
// the vtable of Foo<int> wouldn't be generated
8
9
template <typename A>
10
struct Foo {
11
virtual void foo() {}
12
};
13
14
template <typename A>
15
struct Bar {
16
void bar();
17
};
18
19
template <typename A>
20
void Bar<A>::bar() {
21
Foo<A> oof;
22
}
23
24
int main () {
25
Bar<int> rab;
26
27
rab.bar();
28
}