Debian Codegraph @

gcc/testsuite/g++.dg/other/static1.C

raw
1 // PR c++/9574
2 // Origin: [email protected] and [email protected]
3 // The new parser ICE on this test and then it could
4 // not find z in bar::bar().
5
6 // { dg-do compile }
7
8 struct X {
9 void operator[](const int& __k);
10 };
11 struct foo {
12 static X x;
13 };
14 struct bar {
15 int z;
16 bar () { foo::x[z]; }
17 };