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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [rtti/] [dyncast4.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Test to make sure that we keep searching if we don't find the type we
2
// want at the expected address.
3
 
4
// { dg-do run }
5
 
6
struct A
7
{
8
  virtual void f() {};
9
};
10
 
11
struct B: A { };
12
 
13
struct C: A { };
14
 
15
struct D: B, C { };
16
 
17
int main()
18
{
19
  D d;
20
  A* ap = static_cast(&d);
21
  C* cp = dynamic_cast(ap);
22
  if (cp == 0)
23
    return 1;
24
  else
25
    return 0;
26
}

powered by: WebSVN 2.1.0

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