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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>:

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

commit r16-1067-gaa935ce40a777eb0b4a4d3d2e03cf2efb4cf9619
Author: Andrew Pinski <quic_apin...@quicinc.com>
Date:   Mon Jun 2 15:56:20 2025 -0700

    switch-conversion: Mark CSWTCH as mergeable [PR120451]

    When we have a smallish CSWTCH, it could be placed in the rodata.cst16
    section so it can be merged with other constants across TUs.

    The fix is simple; just mark the decl as mergable (DECL_MERGEABLE).
    DECL_MERGEABLE was added with r14-1500-g4d935f52b0d5c0 specifically
    to improve these kind of decls.

            PR tree-optimization/120451

    gcc/ChangeLog:

            * tree-switch-conversion.cc (switch_conversion::build_one_array):
Mark
            the newly created decl as mergable.

    gcc/testsuite/ChangeLog:

            * gcc.dg/tree-ssa/cswtch-6.c: New test.

    Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>

Reply via email to