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

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

Line No. Rev Author Line
1 149 jeremybenn
// Test that typeid sees through references even when optimizing.
2
// { dg-do run }
3
// { dg-options "-O2" }
4
 
5
#include 
6
 
7
struct A
8
{
9
  virtual ~A() { }
10
};
11
 
12
class B : public A { };
13
 
14
int main ()
15
{
16
  B b;
17
  A &aref = b;
18
 
19
  return typeid (aref) != typeid (b);
20
}

powered by: WebSVN 2.1.0

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