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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [inherit/] [covariant11.C] - Rev 693

Compare with Previous | Blame | View Log

// { dg-do compile }

// Contributed by Nathan Sidwell 23 Oct 2003 <nathan@codesourcery.com>
// Origin: grigory@stl.sarov.ru
// PR c++/12700 ICE with covariancy

struct c2 { int i; };

struct c1 {
  virtual c2& f8() {}
};

struct c3 : c1, c2 {
  virtual c2& f8() {}
};

struct c11 : public c1 {
  virtual c3& f8() {}
};

struct c15 : virtual c3 {
  virtual c2& f8() {}
};

struct c18 : virtual c11 {
  virtual c15& f8();
};

c15& c18::f8() { throw 0; }

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.