1 // { dg-options -std=c++0x }
2 
3 struct X
4 {
5   int x = 5;
fX6   int f() { return x; }
7 };
8 struct Y : X
9 {
10   int y = this->x;
11 };
12 template <class T> struct Z : T
13 {
14   int y = this->f();
15 };
main()16 int main()
17 {
18   Y foo;
19   Z<X> bar;
20 }
21