summaryrefslogtreecommitdiff
path: root/gcc/genmatch.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2017-05-19 11:13:48 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2017-05-19 11:13:48 +0000
commit3a6461f307f6204f2b415a3fc94fa21dc7cbe3ec (patch)
treeaebf69b2984f0a7b5173d9f96895be238b467a85 /gcc/genmatch.c
parent9ca8a4c064941ea3495131e36b7710375606b009 (diff)
re PR tree-optimization/80821 (genmatch conflicting predicates)
2017-05-19 Richard Biener <rguenther@suse.de> PR build/80821 * genmatch.c (dt_node::gen_kids_1): Add missing scope around predicate evaluation. From-SVN: r248264
Diffstat (limited to 'gcc/genmatch.c')
-rw-r--r--gcc/genmatch.c4
1 files changed, 4 insertions, 0 deletions
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 <expr *> (preds[i]->op);
predicate_id *p = as_a <predicate_id *> (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)