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/] [rtti/] [dyncast2.C] - Blame information for rev 301

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// PR c++/34364
2
// { dg-do run }
3
 
4
struct A
5
{
6
  virtual ~A () {}
7
};
8
 
9
struct B : public A
10
{
11
  template  struct C
12
  {
13
    static void f (A &a)
14
    {
15
      dynamic_cast (a).g ();
16
    }
17
  };
18
 
19
  B () : c (6) {}
20
  void g () { c++; }
21
  int c;
22
};
23
 
24
B b;
25
 
26
int
27
main (void)
28
{
29
  B::C::f (b);
30
  return b.c != 7;
31
}

powered by: WebSVN 2.1.0

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