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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [rtti/] [dyncast2.C] - Rev 816

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

// PR c++/34364
// { dg-do run }

struct A
{
  virtual ~A () {}
};

struct B : public A
{
  template <typename T> struct C
  {
    static void f (A &a)
    {
      dynamic_cast <B &>(a).g ();
    }
  };

  B () : c (6) {}
  void g () { c++; }
  int c;
};

B b;

int
main (void)
{
  B::C<int>::f (b);
  return b.c != 7;
}

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

powered by: WebSVN 2.1.0

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