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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [rtti2.C] - Rev 801

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

// { dg-do compile }
// { dg-options "-O2" }
// We used to ICE in compare_values as the types for a comparison
// were not the same kind of types.

struct class1
{
  virtual ~class1 ();
};
struct class2 :  class1 { };

void f(class1 * oo)
{
  class2 * oj = dynamic_cast <class2 *>(oo) ;
  if (oj)
    delete oo;
}

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.