This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, committed] PR middle-end/35736 -- make PREDICT_EXPR have void type
- From: Michael Meissner <gnu at the-meissners dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 3 Jul 2008 12:25:11 -0400
- Subject: [PATCH, committed] PR middle-end/35736 -- make PREDICT_EXPR have void type
I committed the following patch to fix PR 35736 after doing a full bootstrap
and make check-gcc without regressions. It looks like PREDICT_EXPR was the
only tree type created without a valid type node.
[gcc]
2008-07-03 Michael Meissner <gnu@the-meissners.org>
PR middle-end/35736
* predict.c (build_predict_expr): Use void_type_node for the tree
type, instead of NULL_TREE.
[gcc/testsuite]
2008-07-03 Michael Meissner <gnu@the-meissners.org>
PR middle-end/35736
* gcc.dg/pr35736.c: New file.
Index: gcc/predict.c
===================================================================
--- gcc/predict.c (revision 137424)
+++ gcc/predict.c (working copy)
@@ -1944,7 +1944,8 @@ gate_estimate_probability (void)
tree
build_predict_expr (enum br_predictor predictor, enum prediction taken)
{
- tree t = build1 (PREDICT_EXPR, NULL_TREE, build_int_cst (NULL, predictor));
+ tree t = build1 (PREDICT_EXPR, void_type_node,
+ build_int_cst (NULL, predictor));
PREDICT_EXPR_OUTCOME (t) = taken;
return t;
}
Index: gcc/testsuite/gcc.dg/pr35736.c
===================================================================
--- gcc/testsuite/gcc.dg/pr35736.c (revision 0)
+++ gcc/testsuite/gcc.dg/pr35736.c (revision 0)
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O -Wall" } */
+
+void foo()
+{
+ while (1)
+ for (;;({ continue; }))
+ ;
+}
--
Michael Meissner
email: gnu@the-meissners.org
http://www.the-meissners.org