2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / other / pr82032.C
blob607bf85c8e10a44b3201a4ed6dcdb5be64e6cef8
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -Wno-return-type" } */
4 template <typename a> class b
6 public:
7   typename a::aa operator[] (typename a::c) { }
8 };
9 class d
11 public:
12   typedef long c;
13   typedef int aa;
15 struct e
17   int af[4];
18   int ag;
20 b<d> f;
21 bool
22 g (e &i)
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       }
35   return true;