gcc/testsuite/g++.dg/lookup/scoped13.C
raw| 1 | // PR c++/112744 |
| 2 | // { dg-do compile } |
| 3 | |
| 4 | struct A { const static int a = 0; }; |
| 5 | struct B : A {}; |
| 6 | struct C : A {}; |
| 7 | struct D : B, C {}; |
| 8 | |
| 9 | int main() |
| 10 | { |
| 11 | D d; |
| 12 | (void) d.x; // { dg-error ".struct D. has no member named .x." } |
| 13 | (void) d.A::x; // { dg-error ".struct A. has no member named .x." } |
| 14 | } |