]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/g++.old-deja/g++.pt/local6.C
static11.C: Add xtensa-*-elf* to the list of targets to skip.
[gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / local6.C
1 extern "C" void abort();
2
3 template <class T>
4 int f(T)
5 {
6 struct S1 {
7 virtual int foo() { return 1; }
8 };
9
10 struct S2 : public S1 {
11 int foo() { return 2; }
12 };
13
14 S1* s2 = new S2;
15
16 return s2->foo();
17 }
18
19
20 int main()
21 {
22 if (f(3) != 2)
23 abort();
24 }
This page took 0.038108 seconds and 5 git commands to generate.