tree-optimization/96037 - fix uninitialized use of slp_op
authorRichard Biener <rguenther@suse.de>
Fri, 3 Jul 2020 10:50:37 +0000 (12:50 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 3 Jul 2020 10:52:33 +0000 (12:52 +0200)
The following avoids leaving slp_def as passed to vect_is_simple_use
by reference uninitialized.

2020-07-03  Richard Biener  <rguenther@suse.de>

PR tree-optimization/96037
* tree-vect-stmts.c (vect_is_simple_use): Initialize *slp_def.

gcc/tree-vect-stmts.c

index 9228f9c..f66c5f5 100644 (file)
@@ -11238,6 +11238,7 @@ vect_is_simple_use (vec_info *vinfo, stmt_vec_info stmt, slp_tree slp_node,
     }
   else
     {
+      *slp_def = NULL;
       if (gassign *ass = dyn_cast <gassign *> (stmt->stmt))
        {
          if (gimple_assign_rhs_code (ass) == COND_EXPR