This initializes the rstmt variable with NULL and adds an assert to
check that a value has been given by one of the if cases before use.
This fixes the bootstrap failure due to -Werror.
Committed under the gcc obvious rule.
gcc/ChangeLog:
* tree-vect-slp.c (vectorize_slp_instance_root_stmt): Initialize rstmt.
From-SVN: r277788
+2019-11-04 Tamar Christina <tamar.christina@arm.com>
+
+ * tree-vect-slp.c (vectorize_slp_instance_root_stmt): Initialize rstmt.
+
2019-11-04 Martin Sebor <msebor@redhat.com>
PR tree-optimization/92349
void
vectorize_slp_instance_root_stmt (slp_tree node, slp_instance instance)
{
- gassign *rstmt;
+ gassign *rstmt = NULL;
if (SLP_TREE_NUMBER_OF_VEC_STMTS (node) == 1)
{
tree r_constructor = build_constructor (rtype, v);
rstmt = gimple_build_assign (lhs, r_constructor);
}
+
+ gcc_assert (rstmt);
+
gimple_stmt_iterator rgsi = gsi_for_stmt (instance->root_stmt->stmt);
gsi_replace (&rgsi, rstmt, true);
}