From 1746681c3c167adafb7c0a30978dc2ca96144121 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 8 Dec 2020 12:54:48 +0100 Subject: [PATCH] tree-optimization/98192 - fix double free in SLP This makes sure to clear the vector pointer on release. 2020-12-08 Richard Biener PR tree-optimization/98192 * tree-vect-slp.c (vect_build_slp_instance): Get scalar_stmts by reference. --- gcc/tree-vect-slp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 35e783505b4..d248ce2c3f7 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -2212,7 +2212,7 @@ vect_analyze_slp_instance (vec_info *vinfo, static bool vect_build_slp_instance (vec_info *vinfo, slp_instance_kind kind, - vec scalar_stmts, + vec &scalar_stmts, stmt_vec_info root_stmt_info, unsigned max_tree_size, scalar_stmts_to_slp_tree_map_t *bst_map, -- 2.30.2