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] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-O2" }
3
// We used to ICE in compare_values as the types for a comparison
4
// were not the same kind of types.
5
 
6
struct class1
7
{
8
  virtual ~class1 ();
9
};
10
struct class2 :  class1 { };
11
 
12
void f(class1 * oo)
13
{
14
  class2 * oj = dynamic_cast (oo) ;
15
  if (oj)
16
    delete oo;
17
}

powered by: WebSVN 2.1.0

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