summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/rtti/no-rtti.C
blob: fdf2e60527411303cfac57551e87b804f917b19a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// { dg-do compile }
// { dg-options "-fno-rtti" }

// PR C++/10891

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

struct B : A {
};

A* f();

int main()
{
   B* b = dynamic_cast<B*>(f()); // { dg-error "" }
}