gcc/testsuite/g++.old-deja/g++.other/lookup21.C
raw| 1 | // { dg-do run } |
| 2 | // Check that we don't complain about ambiguity between the same static |
| 3 | // member function in different subobjects. |
| 4 | |
| 5 | struct A { |
| 6 | static void f() {} |
| 7 | }; |
| 8 | |
| 9 | struct B: public A { }; |
| 10 | struct C: public A { }; |
| 11 | struct D: public B, public C { }; |
| 12 | |
| 13 | int main() |
| 14 | { |
| 15 | D d; |
| 16 | d.f(); |
| 17 | } |