public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew MacLeod <amacleod@redhat.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>
Cc: "hernandez, aldy" <aldyh@redhat.com>
Subject: [COMMITTED] PR tree-optimization/107497 - Make sure ssa-name is valid.
Date: Tue, 1 Nov 2022 14:04:38 -0400	[thread overview]
Message-ID: <bc4dfa6e-997a-cdd1-4370-1d0ebc0363fd@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 49 bytes --]

pushed as obvious.   Testing running.

Andrew


[-- Attachment #2: 497.diff --]
[-- Type: text/x-patch, Size: 874 bytes --]

commit 82b0345f6137b112728590d7c010dcd2cef08514
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 --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);
 

                 reply	other threads:[~2022-11-01 18:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bc4dfa6e-997a-cdd1-4370-1d0ebc0363fd@redhat.com \
    --to=amacleod@redhat.com \
    --cc=aldyh@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).