From 3a6461f307f6204f2b415a3fc94fa21dc7cbe3ec Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 19 May 2017 11:13:48 +0000 Subject: [PATCH] re PR tree-optimization/80821 (genmatch conflicting predicates) 2017-05-19 Richard Biener PR build/80821 * genmatch.c (dt_node::gen_kids_1): Add missing scope around predicate evaluation. From-SVN: r248264 --- gcc/ChangeLog | 6 ++++++ gcc/genmatch.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3b700e0f1ed..9e386f75933 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-05-19 Richard Biener + + PR build/80821 + * genmatch.c (dt_node::gen_kids_1): Add missing scope around + predicate evaluation. + 2017-05-19 Jan Hubicka * ipa-inline.h (ipa_call_summary): Turn sizes into signed; diff --git a/gcc/genmatch.c b/gcc/genmatch.c index 5621aa05b59..2c3183b25af 100644 --- a/gcc/genmatch.c +++ b/gcc/genmatch.c @@ -3005,6 +3005,8 @@ dt_node::gen_kids_1 (FILE *f, int indent, bool gimple, expr *e = as_a (preds[i]->op); predicate_id *p = as_a (e->operation); preds[i]->get_name (kid_opname); + fprintf_indent (f, indent, "{\n"); + indent += 2; fprintf_indent (f, indent, "tree %s_pops[%d];\n", kid_opname, p->nargs); fprintf_indent (f, indent, "if (%s_%s (%s, %s_pops%s))\n", gimple ? "gimple" : "tree", @@ -3020,6 +3022,8 @@ dt_node::gen_kids_1 (FILE *f, int indent, bool gimple, } preds[i]->gen_kids (f, indent + 4, gimple); fprintf (f, "}\n"); + indent -= 2; + fprintf_indent (f, indent, "}\n"); } for (unsigned i = 0; i < others.length (); ++i) -- 2.30.2