summaryrefslogtreecommitdiff
path: root/gcc/c-family/array-notation-common.c
diff options
context:
space:
mode:
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-27 09:36:20 +0000
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-27 09:36:20 +0000
commitd4e328e9624895675e675cd19ce9b2808557e3cf (patch)
treedd1adb68f7048a3707687ccc46f906e3f92b822d /gcc/c-family/array-notation-common.c
parentd411bc7ec319bf95d7d004aa16ac964cab5a0a61 (diff)
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231001 138bc75d-0d04-0410-961f-82ee72b054a4
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 4f7072bda84e..5f2209dbc31a 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