gnu /
gcc /
09884fa0f90da67915245622254cdfb947b87d37 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)
4 files changed