From e58793e86f906fe4757d05f778c8909270d60942 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 3 Nov 2009 15:52:30 -0500 Subject: [PATCH] re PR c++/39786 (Qualified name lookup through different numbers of using directives) PR c++/39786 * g++.dg/lookup/using22.C: New. From-SVN: r153865 --- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/g++.dg/lookup/using22.C | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 gcc/testsuite/g++.dg/lookup/using22.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 30140903d67..6ea645a6ff1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2009-11-03 Jason Merrill + 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 index 00000000000..2396f9ab185 --- /dev/null +++ b/gcc/testsuite/g++.dg/lookup/using22.C @@ -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];