https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119204
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:f82a279e0e6bb792f70cce1f9451537c9b5eb8be commit r13-9598-gf82a279e0e6bb792f70cce1f9451537c9b5eb8be Author: Richard Biener <rguent...@suse.de> Date: Tue Mar 11 08:40:44 2025 +0100 middle-end/119204 - ICE with strcspn folding The following makes sure to convert the folded expression to the original expression type. PR middle-end/119204 * builtins.cc (fold_builtin_strcspn): Preserve the original expression type. * gcc.dg/pr119204.c: New testcase. (cherry picked from commit 68932eeb38f66fbc0c3cf4b77ff7dde8a408f2e4)