Reset SCEV before removing unreachable globals.
authorAndrew MacLeod <amacleod@redhat.com>
Wed, 1 Feb 2023 16:46:18 +0000 (11:46 -0500)
committerAndrew MacLeod <amacleod@redhat.com>
Fri, 3 Feb 2023 19:42:46 +0000 (14:42 -0500)
commit093e2e1b201c0f324e0d8bfe6487aa2d470a13e7
tree59daf97769e66402dfe7cbf4467c3e545cbf0864
parent27ac6a707e7438c3cec79c24f5d53de79493e2f8
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.
gcc/testsuite/gcc.dg/pr107570.c [new file with mode: 0644]
gcc/tree-vrp.cc