re PR c++/39786 (Qualified name lookup through different numbers of using directives)
authorJason Merrill <jason@redhat.com>
Tue, 3 Nov 2009 20:52:30 +0000 (15:52 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 3 Nov 2009 20:52:30 +0000 (15:52 -0500)
PR c++/39786
* g++.dg/lookup/using22.C: New.

From-SVN: r153865

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lookup/using22.C [new file with mode: 0644]

index 3014090..6ea645a 100644 (file)
@@ -1,5 +1,8 @@
 2009-11-03  Jason Merrill  <jason@redhat.com>
 
+       PR c++/39786
+       * g++.dg/lookup/using22.C: New.
+
        PR c++/41876
        * g++.dg/parse/eh-decl.C: New.
 
diff --git a/gcc/testsuite/g++.dg/lookup/using22.C b/gcc/testsuite/g++.dg/lookup/using22.C
new file mode 100644 (file)
index 0000000..2396f9a
--- /dev/null
@@ -0,0 +1,17 @@
+// PR c++/39786
+
+namespace A {
+    char (*f(char *p))[13] { return 0; }
+}
+
+namespace B {
+    namespace C {
+        char (*f(int p))[42] { return 0; }
+    }
+    using namespace C;
+}
+
+using namespace B;
+using namespace A;
+
+char x[sizeof *::f(0) == 42 ? 1 : -1];