https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96647

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>:

https://gcc.gnu.org/g:4e03e2e08b94f65f2be3db17f880c205ec262f87

commit r11-3075-g4e03e2e08b94f65f2be3db17f880c205ec262f87
Author: Patrick Palka <ppa...@redhat.com>
Date:   Wed Sep 9 09:21:09 2020 -0400

    c++: Fix resolving the address of overloaded pmf [PR96647]

    In resolve_address_of_overloaded_function, currently only the second
    pass over the overload set (which considers just the function templates
    in the overload set) checks constraints and performs return type
    deduction when necessary.  But as the testcases below show, we need to
    do the same when considering non-template functions during the first
    pass.

    gcc/cp/ChangeLog:

            PR c++/96647
            * class.c (resolve_address_of_overloaded_function): Check
            constraints_satisfied_p and perform return-type deduction via
            maybe_instantiate_decl when considering non-template functions
            in the overload set.
            * cp-tree.h (maybe_instantiate_decl): Declare.
            * decl2.c (maybe_instantiate_decl): Remove static.

    gcc/testsuite/ChangeLog:

            PR c++/96647
            * g++.dg/cpp0x/auto-96647.C: New test.
            * g++.dg/cpp0x/error9.C: New test.
            * g++.dg/cpp2a/concepts-fn6.C: New test.

Reply via email to