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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [opt/] [rtti1.C] - Diff between revs 154 and 816

Only display areas with differences | Details | Blame | View Log

Rev 154 Rev 816
// Test that typeid sees through references even when optimizing.
// Test that typeid sees through references even when optimizing.
// { dg-do run }
// { dg-do run }
// { dg-options "-O2" }
// { dg-options "-O2" }
#include 
#include 
struct A
struct A
{
{
  virtual ~A() { }
  virtual ~A() { }
};
};
class B : public A { };
class B : public A { };
int main ()
int main ()
{
{
  B b;
  B b;
  A &aref = b;
  A &aref = b;
  return typeid (aref) != typeid (b);
  return typeid (aref) != typeid (b);
}
}
 
 

powered by: WebSVN 2.1.0

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