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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-16 branch has been updated by Marek Polacek
<[email protected]>:

https://gcc.gnu.org/g:736af1b00c328888bbc42f5f03a7c737072300a1

commit r16-8849-g736af1b00c328888bbc42f5f03a7c737072300a1
Author: Marek Polacek <[email protected]>
Date:   Wed Apr 29 17:24:19 2026 -0400

    c++/reflection: propagate cv-quals for SPLICE_SCOPE [PR125096]

    tsubst_splice_scope isn't propagating cv-quals from the template tree
    to the result, which means wrongly failed asserts in the new test due to
    a missing 'const'.  So let's add the cv-quals like we do in so many
    other places in tsubst.

            PR c++/125096

    gcc/cp/ChangeLog:

            * pt.cc (tsubst_splice_scope): Don't return early for
            dependent_splice_p.  Propagate cv-qualifiers from the
            SPLICE_SCOPE to the result.
            * reflect.cc (valid_splice_scope_p): Accept SPLICE_SCOPE.

    gcc/testsuite/ChangeLog:

            * g++.dg/reflect/mangle4.C: Move dg-error.
            * g++.dg/reflect/dep16.C: New test.

    Reviewed-by: Jason Merrill <[email protected]>
    (cherry picked from commit 0727299846d3cfaa6c1f537019f9a9e583d07d8d)

Reply via email to