X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.mike%2Fdyncast7.C;fp=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.mike%2Fdyncast7.C;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=b1a55a43592cf04cc865e5b53677529eadb71825;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/gcc/testsuite/g++.old-deja/g++.mike/dyncast7.C b/gcc/testsuite/g++.old-deja/g++.mike/dyncast7.C deleted file mode 100644 index b1a55a43..00000000 --- a/gcc/testsuite/g++.old-deja/g++.mike/dyncast7.C +++ /dev/null @@ -1,28 +0,0 @@ -// Special g++ Options: -fexceptions - -#include -#include - -class A { -public: - virtual void j () {} -}; - -class B : public A { }; - -void x (A& a) { - // These should all work. - const B& b2 = dynamic_cast(a); - const B& b3 = dynamic_cast((const A&)a); - const B& b4 = dynamic_cast(a); -} - -int main() { - try { - B b; - x (b); - } catch (std::exception& e) { - // If we get a bad_cast, it is wrong. - return 1; - } -}