This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix placement of break stmt in genmatch generated files
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 13 Nov 2014 14:26:08 +0100 (CET)
- Subject: [PATCH] Fix placement of break stmt in genmatch generated files
- Authentication-results: sourceware.org; auth=none
This fixes an error I introduced by
2014-11-09 Richard Biener <rguenther@suse.de>
* match.pd: Add patterns convering two conversions in a row
from fold-const.c.
* fold-const.c (fold_unary_loc): Remove them here.
* tree-ssa-forwprop.c (combine_conversions): Likewise.
* genmatch.c (dt_node::gen_kids): Check whether we may
follow SSA use-def chains.
where I avoided an extra {} nesting but failed to move the break
stmt out of the conditional block. This results in unwanted fallthrus
(non-fatal for the patterns currently in trunk match.pd).
Bootstrapped & tested on x86_64-unknown-linux-gnu, applied.
Richard.
2014-11-13 Richard Biener <rguenther@suse.de>
* genmatch.c (dt_node::gen_kids): Fix placement of break statement.
Index: gcc/genmatch.c
===================================================================
--- gcc/genmatch.c (revision 217465)
+++ gcc/genmatch.c (working copy)
@@ -2124,8 +2124,8 @@ dt_node::gen_kids (FILE *f, bool gimple)
"}\n");
}
- fprintf (f, "break;\n"
- "}\n");
+ fprintf (f, "}\n"
+ "break;\n");
}
for (unsigned i = 0; i < generic_exprs.length (); ++i)