summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lookup/koenig4.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/lookup/koenig4.C')
-rw-r--r--gcc/testsuite/g++.dg/lookup/koenig4.C21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/lookup/koenig4.C b/gcc/testsuite/g++.dg/lookup/koenig4.C
new file mode 100644
index 000000000..49fa5eaa6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/koenig4.C
@@ -0,0 +1,21 @@
+// { dg-do compile }
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 5 Oct 2004 <nathan@codesourcery.com>
+
+// Origin: Wolfgang Bangerth <bangerth@dealii.org>
+// Incorrect koenig lookup
+
+struct A {};
+
+struct B {
+ static void foo();
+ static void bar(const A &);
+};
+
+void bar(const A &){}
+
+void B::foo () {
+ A a;
+ bar (a);
+}