aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family/array-notation-common.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2015-11-27 10:36:20 +0100
committerMartin Liska <marxin@gcc.gnu.org>2015-11-27 09:36:20 +0000
commitb58d3df29fd0c37a2d5115fc9c708cffcc379ffc (patch)
treedd1adb68f7048a3707687ccc46f906e3f92b822d /gcc/c-family/array-notation-common.c
parent4d95edca1212e23855e4f613b588cbc6dac89999 (diff)
downloadgcc-b58d3df29fd0c37a2d5115fc9c708cffcc379ffc.zip
gcc-b58d3df29fd0c37a2d5115fc9c708cffcc379ffc.tar.gz
gcc-b58d3df29fd0c37a2d5115fc9c708cffcc379ffc.tar.bz2
Fix memory leak in cilk
PR c++/68312 * c-array-notation.c (fix_builtin_array_notation_fn): Use release_vec_vec instead of vec::release. (build_array_notation_expr): Likewise. (fix_conditional_array_notations_1): Likewise. (fix_array_notation_expr): Likewise. (fix_array_notation_call_expr): Likewise. PR c++/68312 * cp-array-notation.c (expand_sec_reduce_builtin): Likewise. (create_array_refs): Replace argument with const reference. (expand_an_in_modify_expr): Likewise. (cp_expand_cond_array_notations): Likewise. (expand_unary_array_notation_exprs): Likewise. PR c++/68312 * array-notation-common.c (cilkplus_extract_an_triplets): Release vector of vectors. * cilk.c (gimplify_cilk_spawn): Free allocated memory. PR c++/68312 * vec.h (release_vec_vec): New function. From-SVN: r231001
Diffstat (limited to 'gcc/c-family/array-notation-common.c')
-rw-r--r--gcc/c-family/array-notation-common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-family/array-notation-common.c b/gcc/c-family/array-notation-common.c
index 4f7072b..5f2209d 100644
--- a/gcc/c-family/array-notation-common.c
+++ b/gcc/c-family/array-notation-common.c
@@ -636,6 +636,8 @@ cilkplus_extract_an_triplets (vec<tree, va_gc> *list, size_t size, size_t rank,
fold_build1 (CONVERT_EXPR, integer_type_node,
ARRAY_NOTATION_STRIDE (ii_tree));
}
+
+ release_vec_vec (array_exprs);
}
/* Replaces all the __sec_implicit_arg functions in LIST with the induction