https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122302
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Jakub Jelinek <[email protected]>: https://gcc.gnu.org/g:f8f8e79c8139465bf09aa86952bd64bd93364ec3 commit r15-10439-gf8f8e79c8139465bf09aa86952bd64bd93364ec3 Author: Jakub Jelinek <[email protected]> Date: Wed Oct 22 13:11:52 2025 +0200 c++: Fix up RAW_DATA_CST handling in braced_list_to_string [PR122302] The following testcase is miscompiled, because a RAW_DATA_CST tree node is shared by multiple CONSTRUCTORs and when the braced_list_to_string function changes one to extend the RAW_DATA_CST over the single preceding and single succeeding INTEGER_CST, it changes the RAW_DATA_CST in the other CONSTRUCTOR where the elts around it are still present. Fixed by tweaking a copy of it instead, like we handle it in other spots. 2025-10-22 Jakub Jelinek <[email protected]> PR c++/122302 * c-common.cc (braced_list_to_string): Call copy_node on RAW_DATA_CST before changing RAW_DATA_POINTER and RAW_DATA_LENGTH on it. * g++.dg/cpp0x/pr122302.C: New test. * g++.dg/cpp/embed-27.C: New test. (cherry picked from commit 79b49977b1894a0a5eea3d2125eb6546b9d0cf02)
