]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Revert "c++: using overloaded with local decl [PR92918]"
authorJason Merrill <jason@redhat.com>
Thu, 17 Feb 2022 23:11:23 +0000 (18:11 -0500)
committerJason Merrill <jason@redhat.com>
Thu, 17 Feb 2022 23:12:13 +0000 (18:12 -0500)
       PR c++/104476

This reverts commit decd38f99dd05eb54ddcaee7c52f21a56a844613.

gcc/cp/name-lookup.c
gcc/testsuite/g++.dg/lookup/using66.C [deleted file]

index f8caa16fc762f8b00278e2f302a2b0fc12ba4166..533d79542c9357d87eeccb05e96d5a96d384e9dc 100644 (file)
@@ -4552,7 +4552,7 @@ push_class_level_binding_1 (tree name, tree x)
        old_decl = bval;
       else if (TREE_CODE (bval) == USING_DECL
               && OVL_P (target_decl))
-       old_decl = bval;
+       return true;
       else if (OVL_P (target_decl)
               && OVL_P (target_bval))
        old_decl = bval;
diff --git a/gcc/testsuite/g++.dg/lookup/using66.C b/gcc/testsuite/g++.dg/lookup/using66.C
deleted file mode 100644 (file)
index 02383bb..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// PR c++/92918
-// { dg-do compile { target c++11 } }
-
-struct Base03
-{
-    static void impl();
-};
-
-struct Problem : Base03
-{
-    using Base03::impl;
-    static int impl(char const *);
-
-    template <typename T>
-    auto f(const T &t) const
-    -> decltype(impl(t))
-    {
-        return impl(t);
-    }
-};
-
-Problem t;
-int i = t.f("42");