summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lookup/ns4.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/lookup/ns4.C')
-rw-r--r--gcc/testsuite/g++.dg/lookup/ns4.C21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/lookup/ns4.C b/gcc/testsuite/g++.dg/lookup/ns4.C
new file mode 100644
index 000000000..aabfcfcb7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/ns4.C
@@ -0,0 +1,21 @@
+// PR c++/43145
+// { dg-do link }
+
+namespace N {
+ void f();
+}
+
+void N::f()
+{
+ extern int i;
+ extern void g();
+ i = 1;
+ g();
+}
+
+namespace N {
+ int i;
+ void g() { }
+}
+
+int main() { }