public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-3597] Make sure ssa-name is valid.
@ 2022-11-01 18:02 Andrew Macleod
  0 siblings, 0 replies; only message in thread
From: Andrew Macleod @ 2022-11-01 18:02 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:82b0345f6137b112728590d7c010dcd2cef08514

commit r13-3597-g82b0345f6137b112728590d7c010dcd2cef08514
Author: Andrew MacLeod <amacleod@redhat.com>
Date:   Tue Nov 1 13:18:33 2022 -0400

    Make sure ssa-name is valid.
    
            PR tree-optimization/107497
            * tree-vrp.cc (remove_unreachable::remove_and_update_globals):
            Check that ssa-name still exists before accessing it.

Diff:
---
 gcc/tree-vrp.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/tree-vrp.cc b/gcc/tree-vrp.cc
index f0e4d37bef0..39f7eb7a75e 100644
--- a/gcc/tree-vrp.cc
+++ b/gcc/tree-vrp.cc
@@ -180,7 +180,7 @@ remove_unreachable::remove_and_update_globals (bool final_p)
   bitmap_copy (dce, all_exports);
   // Don't attempt to DCE parameters.
   EXECUTE_IF_SET_IN_BITMAP (all_exports, 0, i, bi)
-    if (SSA_NAME_IS_DEFAULT_DEF (ssa_name (i)))
+    if (!ssa_name (i) || SSA_NAME_IS_DEFAULT_DEF (ssa_name (i)))
       bitmap_clear_bit (dce, i);
   simple_dce_from_worklist (dce);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-01 18:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-01 18:02 [gcc r13-3597] Make sure ssa-name is valid Andrew Macleod

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).