https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119204
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:68932eeb38f66fbc0c3cf4b77ff7dde8a408f2e4 commit r15-7955-g68932eeb38f66fbc0c3cf4b77ff7dde8a408f2e4 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.