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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [constexpr-base3.C] - Rev 715

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

// PR c++/46526
// { dg-do run }
// { dg-options "-std=c++0x" }

struct Base
{
  virtual int getid () = 0;
};

struct A : public Base
{
  virtual int getid () { return 1; }
};

struct B : public Base
{
  virtual int getid () { throw "here"; }
};

int
main ()
{
  A a;
  B b;
  Base& ar = a;
  ar.getid ();
}

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.