From: Martin Liska Date: Fri, 27 Nov 2015 08:37:44 +0000 (+0100) Subject: Fix parser memory leak in cilk_simd_fn_info X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=12a18ca5430d7c1467e61777a0365880fbba07f8;p=gcc.git Fix parser memory leak in cilk_simd_fn_info * parser.c (cp_parser_late_parsing_cilk_simd_fn_info): Release tokens. From-SVN: r230996 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1d6e252ebb1..eb4bb6810a1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2015-11-27 Martin Liska + + * parser.c (cp_parser_late_parsing_cilk_simd_fn_info): + Release tokens. + 2015-11-26 Andreas Arnez * cp-gimplify.c (genericize_cp_loop): Change LOOP_EXPR's location diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index a9c0a452d6b..6583d4ca7db 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -35015,6 +35015,7 @@ cp_parser_late_parsing_cilk_simd_fn_info (cp_parser *parser, tree attrs) error ("%<#pragma omp declare simd%> of % attribute cannot be " "used in the same function marked as a Cilk Plus SIMD-enabled " " function"); + parser->cilk_simd_fn_info->tokens.release (); XDELETE (parser->cilk_simd_fn_info); parser->cilk_simd_fn_info = NULL; return attrs; @@ -35052,6 +35053,7 @@ cp_parser_late_parsing_cilk_simd_fn_info (cp_parser *parser, tree attrs) attrs = c; } info->fndecl_seen = true; + parser->cilk_simd_fn_info->tokens.release (); XDELETE (parser->cilk_simd_fn_info); parser->cilk_simd_fn_info = NULL; return attrs;