]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - gcc/testsuite/g++.old-deja/g++.mike/p2846a.C
Imported gcc-4.4.3
[msp430-gcc.git] / gcc / testsuite / g++.old-deja / g++.mike / p2846a.C
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p2846a.C b/gcc/testsuite/g++.old-deja/g++.mike/p2846a.C
deleted file mode 100644 (file)
index 8606e42..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-// Shows that problem of initializing one object's vtable pointer from
-// another object's vtable pointer when doing a default copy of it
-// and the vtable pointer involved is the main one.
-
-// Correct answer is B::print.
-// g++ prints D::print, which is wrong.  Cfront gets is right.
-
-// prms-id: 2846
-
-extern "C" int printf(const char *, ...);
-extern "C" void exit(int);
-
-class B {
-public:
-  virtual void print(void) const { printf("B::print\n"); }
-};
-
-class D : public B {
-public:
-  void print(void) const { printf("D::print\n"); exit(1); }
-  B compute(void) const;
-};
-
-B D::compute(void) const
-{
-  B sub(*(B*)this);
-  return sub;
-}
-
-int main () {
-  D titi;
-  titi.compute().print();
-  return 0;
-}