Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.robertl / eb4.C
blobf47d3dbf7a02ee76fd5e5ad4462d3a604bacc9aa
1 // { dg-do assemble  }
2 // Error: Internal Compiler Error in GCC 2.7.2 and EGCS 1998/05/28 snapshot.
4 #include <iostream>
6 class some_base
7         {
8 public:
9         class base_func_args;
10         virtual void func(base_func_args &) = 0; // { dg-error "" } referenced below
11         };
13 class some_base::base_func_args
14         {
15 public:
16         int i;
17         };
19 class some_derived : public some_base
20         {  // { dg-error "" } note
21 public:
22         class derived_func_args;
23         void func(derived_func_args &);
24         };
27 class derived_func_args : public some_base::base_func_args
28         {
29 public:
30         float f;
31         };
33 class some_derived::func(derived_func_args &a)  // { dg-error "" } illegal member syntax
34         {
35         std::cout << a.i << ' ' << a.f << std::endl;
36         }
38 int
39 main()
40         {
41         some_derived d;                     // { dg-error "" } abstract class
42         some_derived::derived_func_args dfa; // { dg-error "" } incomplete class
43         some_base *b = &d;
45         dfa.i = 10;
46         dfa.f = 20;
47         b->func(dfs);                       // { dg-error "" } dfs not declared
48         return 0;
49         }