aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index aca8c57..73fde71 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -9042,7 +9042,12 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
case LTGT_EXPR:
temp = do_store_flag (exp,
modifier != EXPAND_STACK_PARM ? target : NULL_RTX,
- tmode != VOIDmode ? tmode : mode);
+ (tmode != VOIDmode
+ /* do_store_flag does not handle target modes
+ of a different class than the comparison mode.
+ Avoid ICEing in convert_move. */
+ && GET_MODE_CLASS (tmode) == GET_MODE_CLASS (mode))
+ ? tmode : mode);
if (temp != 0)
return temp;