summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/lookup21.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/lookup21.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/lookup21.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup21.C b/gcc/testsuite/g++.old-deja/g++.other/lookup21.C
new file mode 100644
index 000000000..3a7795de1
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/lookup21.C
@@ -0,0 +1,17 @@
+// { dg-do run }
+// Check that we don't complain about ambiguity between the same static
+// member function in different subobjects.
+
+struct A {
+ static void f() {}
+};
+
+struct B: public A { };
+struct C: public A { };
+struct D: public B, public C { };
+
+int main()
+{
+ D d;
+ d.f();
+}