Commit 9ae91886 by Richard Biener Committed by Richard Biener

re PR tree-optimization/86287 (AddressSanitizer: heap-use-after-free on bootstrap with -O3)

2018-06-26  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/86287
	PR bootstrap/86316
	* tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
	(vect_analyze_loop): Initialize n_stmts.

From-SVN: r262132
parent 7d0c1352
2018-06-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/86287
PR bootstrap/86316
* tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
(vect_analyze_loop): Initialize n_stmts.
2018-06-26 Richard Biener <rguenther@suse.de>
PR middle-end/86271
* fold-const.c (fold_convertible_p): Pointer extension
isn't valid.
......
......@@ -2315,7 +2315,7 @@ vect_analyze_loop (struct loop *loop, loop_vec_info orig_loop_vinfo,
return NULL;
}
unsigned n_stmts;
unsigned n_stmts = 0;
poly_uint64 autodetected_vector_size = 0;
while (1)
{
......@@ -8342,8 +8342,9 @@ vect_transform_loop_stmt (loop_vec_info loop_vinfo, gimple *stmt,
/* SLP. Schedule all the SLP instances when the first SLP stmt is
reached. */
if (STMT_SLP_TYPE (stmt_info))
if (slp_vect_type slptype = STMT_SLP_TYPE (stmt_info))
{
if (!*slp_scheduled)
{
*slp_scheduled = true;
......@@ -8354,7 +8355,7 @@ vect_transform_loop_stmt (loop_vec_info loop_vinfo, gimple *stmt,
}
/* Hybrid SLP stmts must be vectorized in addition to SLP. */
if (PURE_SLP_STMT (stmt_info))
if (slptype == pure_slp)
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment