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

--- Comment #13 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:c630157fd01140dbce120c1409c413a97dc17104

commit r13-6715-gc630157fd01140dbce120c1409c413a97dc17104
Author: Patrick Palka <ppa...@redhat.com>
Date:   Thu Mar 16 14:22:54 2023 -0400

    c++: checking ICE with diagnosed constraint recursion [PR100288]

    When satisfaction_cache::get detects constraint recursion, it asserts
    that entry->result is empty.  This makes sense when we're initially
    detecting/diagnosing recursion from the inner recursive call, but
    afterwards from the outer recursive call the recursion error is treated
    like any other unrelated constraint failure encountered during
    satisfaction, and we set entry->result to whatever the satisfaction
    value ended up being.

    Perhaps we should keep entry->result cleared in this case, but that'd
    require the inner recursive call to communicate to the outer recursive
    call that constraint recursion occurred, likely via setting entry->result
    to some sentinel value, which doesn't seem to be worth the complexity.
    So this patch just relaxes the problematic assert to accept non-empty
    entry->result as long as we've already issued an error.

            PR c++/100288

    gcc/cp/ChangeLog:

            * constraint.cc (satisfaction_cache::get): Relax overly strict
            checking assert in the constraint recursion case.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/concepts-recursive-sat5.C: New test.
  • [Bug c++/100288] [11/12/13 Regr... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to