https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98403
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Sandiford <rsand...@gcc.gnu.org>: https://gcc.gnu.org/g:8a25be517f8de8c060705da13db283a268cf6d12 commit r11-6459-g8a25be517f8de8c060705da13db283a268cf6d12 Author: Richard Sandiford <richard.sandif...@arm.com> Date: Tue Jan 5 11:04:15 2021 +0000 rtl-ssa: Fix updates to call clobbers [PR98403] In the PR, fwprop was changing a call instruction and tripped an assert when trying to update a list of call clobbers. There are two ways we could handle this: remove the call clobber and then add it back, or assume that the clobber will stay in its current place. At the moment we don't have enough information to safely move calls around, so the second approach seems simpler and more efficient. gcc/ PR rtl-optimization/98403 * rtl-ssa/changes.cc (function_info::finalize_new_accesses): Explain why we don't remove call clobbers. (function_info::apply_changes_to_insn): Don't attempt to add call clobbers here. gcc/testsuite/ PR rtl-optimization/98403 * g++.dg/opt/pr98403.C: New test.