public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/autopar_devel] Add missing check for gassign.
@ 2020-08-22 22:46 Giuliano Belinassi
  0 siblings, 0 replies; only message in thread
From: Giuliano Belinassi @ 2020-08-22 22:46 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:226bb5b40845cb75047811f26b3a21fe037f6674

commit 226bb5b40845cb75047811f26b3a21fe037f6674
Author: Martin Liska <mliska@suse.cz>
Date:   Thu Jun 18 09:11:31 2020 +0200

    Add missing check for gassign.
    
    gcc/ChangeLog:
    
            * tree-vect-generic.c (expand_vector_condition): Check
            for gassign before inspecting RHS.

Diff:
---
 gcc/tree-vect-generic.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c
index fb955bbf3d2..83d399a7898 100644
--- a/gcc/tree-vect-generic.c
+++ b/gcc/tree-vect-generic.c
@@ -957,8 +957,9 @@ expand_vector_condition (gimple_stmt_iterator *gsi)
 
   if (code == SSA_NAME)
     {
-      gimple *assign = SSA_NAME_DEF_STMT (a);
-      if (TREE_CODE_CLASS (gimple_assign_rhs_code (assign)) == tcc_comparison)
+      gassign *assign = dyn_cast<gassign *> (SSA_NAME_DEF_STMT (a));
+      if (assign != NULL
+	  && TREE_CODE_CLASS (gimple_assign_rhs_code (assign)) == tcc_comparison)
 	{
 	  a_is_comparison = true;
 	  a1 = gimple_assign_rhs1 (assign);


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

only message in thread, other threads:[~2020-08-22 22:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-22 22:46 [gcc/devel/autopar_devel] Add missing check for gassign Giuliano Belinassi

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