From 60049c8def3e6e834f5cfaf9c0ff6de2e6e083b8 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 29 Oct 1998 13:58:38 +0000 Subject: [PATCH] * g++.old-deja/g++.other/dcast2.C: cannot dynamic downcast &x From-SVN: r23429 --- gcc/testsuite/ChangeLog | 2 ++ gcc/testsuite/g++.old-deja/g++.other/dcast2.C | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.other/dcast2.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d0e2a39ab9e2..2b0bf97e69dd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,7 @@ 1998-10-29 Alexandre Oliva + * g++.old-deja/g++.other/dcast2.C: cannot dynamic downcast &x + * g++.old-deja/g++.other/init9.C: test cross initialization of non-POD types diff --git a/gcc/testsuite/g++.old-deja/g++.other/dcast2.C b/gcc/testsuite/g++.old-deja/g++.other/dcast2.C new file mode 100644 index 000000000000..e1bd1c19361f --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/dcast2.C @@ -0,0 +1,17 @@ +// Build don't link: + +// Based on a testcase by Ruslan Shevchenko + +struct B { + virtual ~B(); +}; + +struct D : public B { +}; + +void foo() { + B x; + dynamic_cast(&x); // gets bogus error - XFAIL *-*-* + B* p = &x; + dynamic_cast(p); +} -- 2.47.3