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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <[email protected]>:

https://gcc.gnu.org/g:dad7275f7cc570fe222777285d8e8dbf274bb772

commit r17-4199-gdad7275f7cc570fe222777285d8e8dbf274bb772
Author: Iain Sandoe <[email protected]>
Date:   Mon Sep 7 17:13:57 2026 +0100

    C++: Do not try to re-fold a CONSTRUCTOR in a template [PR126811].

    In a similar manner to PR102990, we are encountering a call to fold
    an expression in a template where the NSDMI has already been folded
    and, as a result, produces expressions which are not handled by the
    tsubst machinery.

            PR c++/126811

    gcc/cp/ChangeLog:

            * typeck2.cc (store_init_value): Skip folding CONSTRUCTORs
            when handling template decls.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/nsdmi-template27.C: New test.

    Signed-off-by: Iain Sandoe <[email protected]>

Reply via email to