Commit 12a18ca5 by Martin Liska Committed by Martin Liska

Fix parser memory leak in cilk_simd_fn_info

	* parser.c (cp_parser_late_parsing_cilk_simd_fn_info):
	Release tokens.

From-SVN: r230996
parent 5cd366f3
2015-11-27 Martin Liska <mliska@suse.cz>
* parser.c (cp_parser_late_parsing_cilk_simd_fn_info):
Release tokens.
2015-11-26 Andreas Arnez <arnez@linux.vnet.ibm.com> 2015-11-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
* cp-gimplify.c (genericize_cp_loop): Change LOOP_EXPR's location * cp-gimplify.c (genericize_cp_loop): Change LOOP_EXPR's location
......
...@@ -35015,6 +35015,7 @@ cp_parser_late_parsing_cilk_simd_fn_info (cp_parser *parser, tree attrs) ...@@ -35015,6 +35015,7 @@ cp_parser_late_parsing_cilk_simd_fn_info (cp_parser *parser, tree attrs)
error ("%<#pragma omp declare simd%> of %<simd%> attribute cannot be " error ("%<#pragma omp declare simd%> of %<simd%> attribute cannot be "
"used in the same function marked as a Cilk Plus SIMD-enabled " "used in the same function marked as a Cilk Plus SIMD-enabled "
" function"); " function");
parser->cilk_simd_fn_info->tokens.release ();
XDELETE (parser->cilk_simd_fn_info); XDELETE (parser->cilk_simd_fn_info);
parser->cilk_simd_fn_info = NULL; parser->cilk_simd_fn_info = NULL;
return attrs; return attrs;
...@@ -35052,6 +35053,7 @@ cp_parser_late_parsing_cilk_simd_fn_info (cp_parser *parser, tree attrs) ...@@ -35052,6 +35053,7 @@ cp_parser_late_parsing_cilk_simd_fn_info (cp_parser *parser, tree attrs)
attrs = c; attrs = c;
} }
info->fndecl_seen = true; info->fndecl_seen = true;
parser->cilk_simd_fn_info->tokens.release ();
XDELETE (parser->cilk_simd_fn_info); XDELETE (parser->cilk_simd_fn_info);
parser->cilk_simd_fn_info = NULL; parser->cilk_simd_fn_info = NULL;
return attrs; return attrs;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment