gcc/testsuite/g++.dg/rtti/dyncast8.C
raw| 1 | // PR c++/115501 |
| 2 | // { dg-do compile } |
| 3 | |
| 4 | struct s{virtual void f();}; |
| 5 | struct s1 : s{}; |
| 6 | namespace __cxxabiv1 |
| 7 | { |
| 8 | extern "C" void __dynamic_cast(); // { dg-message "previous declaration" } |
| 9 | } |
| 10 | void diagnostic_information_impl(s const *se) |
| 11 | { |
| 12 | dynamic_cast<s1 const *>(se); |
| 13 | } |
| 14 | |
| 15 | // { dg-error "conflicting declaration" "" { target *-*-* } 0 } |