aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2011-03-22 10:14:07 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2011-03-22 10:14:07 +0000
commitf2f81d570826c20c299a3509d1b0866f0e9a9afd (patch)
tree808d519b33d7dd476efaf6d387a09d9b464bd020 /gcc/gimplify.c
parentab081dd6234db09f2d8023f1f09777fc8cf10efb (diff)
downloadgcc-f2f81d570826c20c299a3509d1b0866f0e9a9afd.zip
gcc-f2f81d570826c20c299a3509d1b0866f0e9a9afd.tar.gz
gcc-f2f81d570826c20c299a3509d1b0866f0e9a9afd.tar.bz2
* gimplify.c (gimplify_cond_expr): Gimplify COMPOUND_EXPR conditions.
From-SVN: r171282
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index c034ec2..e48409d 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -2992,6 +2992,11 @@ gimplify_cond_expr (tree *expr_p, gimple_seq *pre_p, fallback_t fallback)
return GS_ALL_DONE;
}
+ /* Remove any COMPOUND_EXPR so the following cases will be caught. */
+ STRIP_TYPE_NOPS (TREE_OPERAND (expr, 0));
+ if (TREE_CODE (TREE_OPERAND (expr, 0)) == COMPOUND_EXPR)
+ gimplify_compound_expr (&TREE_OPERAND (expr, 0), pre_p, true);
+
/* Make sure the condition has BOOLEAN_TYPE. */
TREE_OPERAND (expr, 0) = gimple_boolify (TREE_OPERAND (expr, 0));