1// { dg-do run  }
2// g++ 1.36.1 bug 900107_01
3
4// Unlike GCC and Cfront 2.0, the g++ 1.36.1 compiler gives struct, union,
5// and class declarations which are nested within blocks file scope.
6
7// Cfront 2.0 passes this test.
8
9// keywords: block scope, file scope, nested types, tagged types
10
11class c1 { int c1_member1; };
12struct s1 { int s1_member1; };
13union u1 { int u1_member1; };
14enum e1 { e1_val1 };
15typedef int t1;
16
17void foo ()
18{
19  class c1 {			// { dg-bogus "" }
20    int c1_member1;
21  } c1_local_object_0;
22
23  struct s1 {			// { dg-bogus "" }
24    int s1_member1;
25  } s1_local_object_0;
26
27  union u1 {			// { dg-bogus "" }
28    int u1_member1;
29  } u1_local_object_0;
30
31  enum e1 {		// OK using g++ or GCC, but mishandled by Cfront 2.0.
32    e1_value1
33  } e1_local_object_0;
34
35  typedef int t1;		// OK
36}
37
38int main () { return 0; }
39