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] - Rev 832

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

// Test that vtables are set up properly for constructors and destructors
// of template classes.

// { dg-do run }

int r;

template <class T>
struct A {
  virtual void f () { }
  A() { f (); }
  ~A() { f (); }
};

struct B : public A<int> {
  virtual void f () { ++r; }
};

int main ()
{
  { B b; }
  return r;
}

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

powered by: WebSVN 2.1.0

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