aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.robertl/eb17.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.robertl/eb17.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb17.C56
1 files changed, 0 insertions, 56 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb17.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb17.C
deleted file mode 100644
index f32dadba9a5..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb17.C
+++ /dev/null
@@ -1,56 +0,0 @@
-// excess errors test - XFAIL
-// covariant return types in are currently not support for complex inheritance
-#include <stdio.h>
-
-class A {
-public:
- virtual void print();
- virtual A * clone();
-};
-
-class B : virtual public A {
-public:
- void print();
- B * clone();
-};
-
-void A::print()
-{
- printf("A\n");
-}
-
-void B::print()
-{
- printf("B\n");
-}
-
-
-A * A::clone()
-{
- return this;
-}
-
-B * B::clone()
-{
- return this;
-}
-
-
-int main()
-{
- A * a = new B;
- B * b = dynamic_cast<B *>(a);
-
- printf("%p\n",b); // (*2*)
- b->print();
-
- a = b;
- printf("%p\n",a);
- a->print();
-
- a = a->clone();
- printf("%p\n",a);
- a->print(); // (*1*)
-
- return 0;
-}