Commit 496326bc by Richard Biener Committed by Richard Biener

re PR middle-end/77863 (genmatch segfault on a wrong usage of an for operator)

2016-10-05  Richard Biener  <rguenther@suse.de>

	PR middle-end/77863
	* genmatch.c (capture_info::walk_c_expr): Diagnose unknown
	capture ids in c-exprs.

From-SVN: r240777
parent 39bb7d01
2016-10-05 Richard Biener <rguenther@suse.de>
PR middle-end/77863
* genmatch.c (capture_info::walk_c_expr): Diagnose unknown
capture ids in c-exprs.
2016-10-05 Richard Biener <rguenther@suse.de>
PR middle-end/77826
* genmatch.c (dt_operand::gen_match_op): Amend operand_equal_p
with types_match for GIMPLE code gen to handle type mismatched
......
......@@ -2194,8 +2194,10 @@ capture_info::walk_c_expr (c_expr *e)
id = (const char *)n->val.str.text;
else
id = (const char *)CPP_HASHNODE (n->val.node.node)->ident.str;
unsigned where = *e->capture_ids->get(id);
info[info[where].same_as].force_no_side_effects_p = true;
unsigned *where = e->capture_ids->get(id);
if (! where)
fatal_at (n, "unknown capture id '%s'", id);
info[info[*where].same_as].force_no_side_effects_p = true;
if (verbose >= 1
&& !gimple)
warning_at (t, "capture escapes");
......
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