Fix memory leak in cilk
authorMartin Liska <mliska@suse.cz>
Fri, 27 Nov 2015 09:36:20 +0000 (10:36 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Fri, 27 Nov 2015 09:36:20 +0000 (09:36 +0000)
commitb58d3df29fd0c37a2d5115fc9c708cffcc379ffc
treedd1adb68f7048a3707687ccc46f906e3f92b822d
parent4d95edca1212e23855e4f613b588cbc6dac89999
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
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/array-notation-common.c
gcc/c-family/cilk.c
gcc/c/ChangeLog
gcc/c/c-array-notation.c
gcc/cp/ChangeLog
gcc/cp/cp-array-notation.c
gcc/vec.h