summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2004-12-06 00:14:07 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2004-12-06 00:14:07 +0000
commitba8081eb6c8c3f31388796527f3e17b15bc277b2 (patch)
treed152ed5cdac80e796f4a2cfa7a883f81d24c6186 /gcc/expr.c
parentae23f7575ce99a08d5c86fa1ba33a90dd49f1513 (diff)
downloadgcc-ba8081eb6c8c3f31388796527f3e17b15bc277b2.tar.gz
expr.c (expand_expr_real_1): Abort on COND_EXPR of VOID_TYPE.
* expr.c (expand_expr_real_1): Abort on COND_EXPR of VOID_TYPE. From-SVN: r91758
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 1a431458991..b5939ae626d 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -8063,21 +8063,10 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
return const0_rtx;
case COND_EXPR:
- /* If it's void, we don't need to worry about computing a value. */
- if (VOID_TYPE_P (TREE_TYPE (exp)))
- {
- tree pred = TREE_OPERAND (exp, 0);
- tree then_ = TREE_OPERAND (exp, 1);
- tree else_ = TREE_OPERAND (exp, 2);
-
- gcc_assert (TREE_CODE (then_) == GOTO_EXPR
- && TREE_CODE (GOTO_DESTINATION (then_)) == LABEL_DECL
- && TREE_CODE (else_) == GOTO_EXPR
- && TREE_CODE (GOTO_DESTINATION (else_)) == LABEL_DECL);
-
- jumpif (pred, label_rtx (GOTO_DESTINATION (then_)));
- return expand_expr (else_, const0_rtx, VOIDmode, 0);
- }
+ /* A COND_EXPR with its type being VOID_TYPE represents a
+ conditional jump and is handled in
+ expand_gimple_cond_expr. */
+ gcc_assert (!VOID_TYPE_P (TREE_TYPE (exp)));
/* Note that COND_EXPRs whose type is a structure or union
are required to be constructed to contain assignments of