1 /* { dg-do compile } */
2 /* { dg-options "-O3 -Wno-return-type" } */
3 
4 template <typename a> class b
5 {
6 public:
7   typename a::aa operator[] (typename a::c) { }
8 };
9 class d
10 {
11 public:
12   typedef long c;
13   typedef int aa;
14 };
15 struct e
16 {
17   int af[4];
18   int ag;
19 };
20 b<d> f;
21 bool
g(e & i)22 g (e &i)
23 {
24   for (int h; h; ++h)
25     switch (f[h])
26       {
27       case 'x':
28       case 'a':
29 	i.af[h] = 3;
30 	break;
31       default:
32 	return false;
33       }
34 
35   return true;
36 }
37