This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR80821
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 19 May 2017 13:13:00 +0200 (CEST)
- Subject: [PATCH] Fix PR80821
- Authentication-results: sourceware.org; auth=none
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
Richard.
2017-05-19 Richard Biener <rguenther@suse.de>
PR build/80821
* genmatch.c (dt_node::gen_kids_1): Add missing scope around
predicate evaluation.
Index: gcc/genmatch.c
===================================================================
--- gcc/genmatch.c (revision 248263)
+++ gcc/genmatch.c (working copy)
@@ -3005,6 +3013,8 @@ dt_node::gen_kids_1 (FILE *f, int indent
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 +3030,8 @@ dt_node::gen_kids_1 (FILE *f, int indent
}
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)