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

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

https://gcc.gnu.org/g:833b180f097e8bae44634e6a31e9c92d661af301

commit r10-8951-g833b180f097e8bae44634e6a31e9c92d661af301
Author: Patrick Palka <ppa...@redhat.com>
Date:   Wed Oct 28 11:47:26 2020 -0400

    c++: Check constraints before instantiation from mark_used [PR95132]

    This makes mark_used check constraints of a function _before_ calling
    maybe_instantiate_decl, so that we don't try instantiating a function
    (as part of return type deduction) with unsatisfied constraints.

    gcc/cp/ChangeLog:

            PR c++/95132
            * decl2.c (mark_used): Move up the constraints_satisfied_p check
            so that we check constraints before calling maybe_instantiate_decl.

    gcc/testsuite/ChangeLog:

            PR c++/95132
            * g++.dg/cpp2a/concepts-fn7.C: New test.

    (cherry picked from commit 9ccc3495766116ea4ae8e4cd8129beca60e30445)

Reply via email to