From: Alexandre Oliva Date: Thu, 29 Oct 1998 13:58:38 +0000 (+0000) Subject: * g++.old-deja/g++.other/dcast2.C: cannot dynamic downcast &x X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=60049c8def3e6e834f5cfaf9c0ff6de2e6e083b8;p=gcc.git * g++.old-deja/g++.other/dcast2.C: cannot dynamic downcast &x From-SVN: r23429 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d0e2a39ab9e..2b0bf97e69d 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 00000000000..e1bd1c19361 --- /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); +}