tree-optimization/96037 - fix uninitialized use of slp_op

Message ID nycvar.YFH.7.76.2007031252060.4397@zhemvz.fhfr.qr
State New
Headers show
Series
  • tree-optimization/96037 - fix uninitialized use of slp_op
Related show

Commit Message

Richard Biener July 3, 2020, 10:52 a.m.
The following avoids leaving slp_def as passed to vect_is_simple_use
by reference uninitialized.

Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

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 | 1 +
 1 file changed, 1 insertion(+)

-- 
2.25.1

Patch

diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index d68547ed1b5..9fa8854028b 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -11259,6 +11259,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