public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-9526] analyzer: support null operands in remove_ssa_names
@ 2024-03-18 22:46 David Malcolm
  0 siblings, 0 replies; only message in thread
From: David Malcolm @ 2024-03-18 22:46 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:3c2827d75ea8fbf7b84bd69e8d10dc239e5daffe

commit r14-9526-g3c2827d75ea8fbf7b84bd69e8d10dc239e5daffe
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Mon Mar 18 18:44:32 2024 -0400

    analyzer: support null operands in remove_ssa_names
    
    gcc/analyzer/ChangeLog:
            * access-diagram.cc (remove_ssa_names): Support operands being
            NULL_TREE, such as e.g. for COMPONENT_REF's operand 2.
    
    Signed-off-by: David Malcolm <dmalcolm@redhat.com>

Diff:
---
 gcc/analyzer/access-diagram.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/analyzer/access-diagram.cc b/gcc/analyzer/access-diagram.cc
index 2836308c019..a9c5c899950 100644
--- a/gcc/analyzer/access-diagram.cc
+++ b/gcc/analyzer/access-diagram.cc
@@ -311,7 +311,8 @@ remove_ssa_names (tree expr)
     return SSA_NAME_VAR (expr);
   tree t = copy_node (expr);
   for (int i = 0; i < TREE_OPERAND_LENGTH (expr); i++)
-    TREE_OPERAND (t, i) = remove_ssa_names (TREE_OPERAND (expr, i));
+    if (TREE_OPERAND (expr, i))
+      TREE_OPERAND (t, i) = remove_ssa_names (TREE_OPERAND (expr, i));
   return t;
 }

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

only message in thread, other threads:[~2024-03-18 22:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-18 22:46 [gcc r14-9526] analyzer: support null operands in remove_ssa_names David Malcolm

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).