https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107570
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Andrew Macleod <amacl...@gcc.gnu.org>: https://gcc.gnu.org/g:093e2e1b201c0f324e0d8bfe6487aa2d470a13e7 commit r13-5694-g093e2e1b201c0f324e0d8bfe6487aa2d470a13e7 Author: Andrew MacLeod <amacl...@redhat.com> Date: Wed Feb 1 11:46:18 2023 -0500 Reset SCEV before removing unreachable globals. SCEV should be reset in VRP before trying to remove unreachable globals to avoid triggering issues with it's cache. PR tree-optimization/107570 gcc/ * tree-vrp.cc (remove_and_update_globals): Reset SCEV. gcc/testsuite/ * gcc.dg/pr107570.c: New.