summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/dyncast6.C
blob: 60065a496f08312d501802f77ee210a4363a1b2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-do assemble  }
#include <typeinfo>

class A {
public:
  virtual void j () {}
};

class B : public A { };
     
void x (A& a) {
  const B& b1 = dynamic_cast<B&>((const A&)a);	// { dg-error "" } opps
}