diff mbox

Fix PR80821

Message ID alpine.LSU.2.20.1705191312350.20726@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener May 19, 2017, 11:13 a.m. UTC
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.
diff mbox

Patch

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)