OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [template/] [vtable1.C] - Blame information for rev 853

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// 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 
9
struct A {
10
  virtual void f () { }
11
  A() { f (); }
12
  ~A() { f (); }
13
};
14
 
15
struct B : public A {
16
  virtual void f () { ++r; }
17
};
18
 
19
int main ()
20
{
21
  { B b; }
22
  return r;
23
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.