diff mbox

PR79478

Message ID CAAgBjMkcXyU_5JPZV=G3DBipbybrKJFnnOmar2pb5RhOTFhMSw@mail.gmail.com
State New
Headers show

Commit Message

Prathamesh Kulkarni Feb. 13, 2017, 11:57 a.m. UTC
Hi,
As mentioned in PR, the attached patch sets source range when parsing ssa-name
in c_parser_gimple_postfix_expression which avoids uninitialized use.
Is it OK to commit after bootstrap+test ?

Thanks,
Prathamesh
2017-02-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

	PR c/79478
	* gimple-parser.c (c_parser_gimple_postfix_expression): Call
	set_c_expr_source_range when parsing ssa-name.

Comments

Richard Biener Feb. 13, 2017, 1:42 p.m. UTC | #1
On 13/02/17 12:57, Prathamesh Kulkarni wrote:
> Hi,

> As mentioned in PR, the attached patch sets source range when parsing ssa-name

> in c_parser_gimple_postfix_expression which avoids uninitialized use.

> Is it OK to commit after bootstrap+test ?


Ok.

Richard.

> Thanks,

> Prathamesh

>
diff mbox

Patch

diff --git a/gcc/c/gimple-parser.c b/gcc/c/gimple-parser.c
index 681951c..db7e407 100644
--- a/gcc/c/gimple-parser.c
+++ b/gcc/c/gimple-parser.c
@@ -863,6 +863,7 @@  c_parser_gimple_postfix_expression (c_parser *parser)
 	      c_parser_consume_token (parser);
 	      expr.value = c_parser_parse_ssa_name (parser, id, NULL_TREE,
 						    version, ver_offset);
+	      set_c_expr_source_range (&expr, tok_range);
 	      /* For default definition SSA names.  */
 	      if (c_parser_next_token_is (parser, CPP_OPEN_PAREN)
 		  && c_parser_peek_2nd_token (parser)->type == CPP_NAME