https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120341
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:09884fa0f90da67915245622254cdfb947b87d37 commit r15-9786-g09884fa0f90da67915245622254cdfb947b87d37 Author: Richard Biener <rguent...@suse.de> Date: Fri May 30 13:47:55 2025 +0200 tree-optimization/120341 - stores into STRING_CSTs can trap The following fixes conditional store elimination and store motion so they consider stores to STRING_CSTs as trapping. PR tree-optimization/120341 * tree-ssa-loop-im.cc (can_sm_ref_p): STRING_CSTs are readonly. * tree-ssa-phiopt.cc (cond_store_replacement): Likewise. * gcc.dg/torture/pr120341-1.c: New testcase. * gcc.dg/torture/pr120341-2.c: Likewise. (cherry picked from commit 02c58bc4b0885f5b6f50033da35768ebe6c4a030)