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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc4/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [virtual4.C] - Rev 519

Compare with Previous | Blame | View Log

// { dg-do run  }
// Origin: Mark Mitchell <mark@codesourcery.com>

struct B 
{
  B ();
  virtual void f () = 0;
};

B::B () 
{
}

extern B* bp;

template <class T>
struct C : public B
{
  virtual void f () 
    {
    }
};

template <class T>
struct D : public B
{
  virtual void f () 
    {
      bp = new C<T*>;
    }
};

B* bp = new D<int>;

int main ()
{
  bp->f ();
  bp->f ();
}


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.