[PATCH] tree-optimization/96037 - fix uninitialized use of slp_op
Richard Biener
rguenther@suse.de
Fri Jul 3 10:52:20 GMT 2020
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(+)
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
--
2.25.1
More information about the Gcc-patches
mailing list