OSDN Git Service

* name-lookup.c (current_decl_namespace): Non-static.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / lookup / ns4.C
diff --git a/gcc/testsuite/g++.dg/lookup/ns4.C b/gcc/testsuite/g++.dg/lookup/ns4.C
new file mode 100644 (file)
index 0000000..a28cda6
--- /dev/null
@@ -0,0 +1,20 @@
+// { 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() { }