Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.mike / p2960.C
blob510decd3d73863f270375ab28ac824150bba3f50
1 // { dg-do run  }
2 // prms-id: 2960
4 extern "C" int printf(const char *, ...);
6 class Test0 {
7 public:
8   virtual void f0() { }      // works fine if this virtual removed
9 };
11 class Test1 : public Test0 {
12 public:
13   void f1() { f2(); }           // generates bus error here
14   virtual void f2() { printf("Test1::f2\n"); }
17 class Test2 {
18 public:
19   virtual void f3() { }
22 class Test3 : public Test2, public Test1 {    // works fine if Test1 first
23 public:
24   virtual ~Test3() { f1(); }                       // calling f2 directly works
25   virtual void f2() { printf("Test3::f2\n"); }
28 int main() {
29     Test3 t3;
30     return 0;