[Bug c++/121822] [13/14 Regression] ICE in dependent_type_p with concept

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Jun 27 20:08:58 GMT 2026


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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:9e6c046f0a27e1900455676c3f98126b7da62ff8

commit r14-12703-g9e6c046f0a27e1900455676c3f98126b7da62ff8
Author: Patrick Palka <ppalka@redhat.com>
Date:   Tue Feb 17 11:21:45 2026 -0500

    c++: void(concept-id) evaluation [PR121822]

    Similar to r16-7056-g22f51c0f5e62a4, here the expression within
    the decltype void(Derived<T>) is non-dependent enough that we
    instantiate/fold it immediately, during which however convert_to_void
    tries to evaluate the concept-id, which fails.  When in an
    unevaluated context such as decltype I don't think convert_to_void
    should be evaluating concept-ids.

            PR c++/121822

    gcc/cp/ChangeLog:

            * cvt.cc (convert_to_void): Don't evaluate a concept-id
            in an unevaluated context.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/concepts-decltype6.C: New test.

    Reviewed-by: Jason Merrill <jason@redhat.com>
    (cherry picked from commit 44a51e8c7037eacd4315df0e84bf51e6e4021088)


More information about the Gcc-bugs mailing list