Commit ba8081eb by Kazu Hirata Committed by Kazu Hirata

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
parent ae23f757
2004-12-05 Kazu Hirata <kazu@cs.umass.edu>
* expr.c (expand_expr_real_1): Abort on COND_EXPR of
VOID_TYPE.
2004-12-05 Richard Henderson <rth@redhat.com> 2004-12-05 Richard Henderson <rth@redhat.com>
PR target/18841 PR target/18841
......
...@@ -8063,21 +8063,10 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, ...@@ -8063,21 +8063,10 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
return const0_rtx; return const0_rtx;
case COND_EXPR: case COND_EXPR:
/* If it's void, we don't need to worry about computing a value. */ /* A COND_EXPR with its type being VOID_TYPE represents a
if (VOID_TYPE_P (TREE_TYPE (exp))) conditional jump and is handled in
{ expand_gimple_cond_expr. */
tree pred = TREE_OPERAND (exp, 0); gcc_assert (!VOID_TYPE_P (TREE_TYPE (exp)));
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);
}
/* Note that COND_EXPRs whose type is a structure or union /* Note that COND_EXPRs whose type is a structure or union
are required to be constructed to contain assignments of are required to be constructed to contain assignments of
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment