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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [opt/] [rtti1.C] - Blame information for rev 478

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

Line No. Rev Author Line
1 301 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.