From ba8081eb6c8c3f31388796527f3e17b15bc277b2 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 6 Dec 2004 00:14:07 +0000 Subject: 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 --- gcc/expr.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'gcc/expr.c') diff --git a/gcc/expr.c b/gcc/expr.c index 1a43145..b5939ae 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 -- cgit v1.1