https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123156
--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:71daa91d5a9cb2f5c994b735c2e20ff6cf8a18a0 commit r13-10158-g71daa91d5a9cb2f5c994b735c2e20ff6cf8a18a0 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)
