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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Richard Biener
<[email protected]>:

https://gcc.gnu.org/g:05f0bab8dacf874b1aa89806f1c50ecf2b0ac00d

commit r15-10660-g05f0bab8dacf874b1aa89806f1c50ecf2b0ac00d
Author: Richard Biener <[email protected]>
Date:   Wed Dec 17 14:38:23 2025 +0100

    c/123156 - overflow in shuffle mask for __builtin_shufflevector

    At some point the permute vector element type had to match the value
    elemnt in size which easily leads to overflow for char element types
    as shown in the testcase.  This was relaxed for constant permute
    masks, so use ssizetype.

            PR c/123156
    gcc/c-family/
            * c-common.cc (c_build_shufflevector): Use ssizetype for the
            permute vector element type.

    gcc/testsuite/
            * gcc.dg/torture/builtin-shufflevector-pr123156.c: New testcase.

    (cherry picked from commit b44b4f74344e094ff58125ed2f00dbb70aafc942)

Reply via email to