+2011-03-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/48204
+ * simplify-rtx.c (simplify_const_unary_operation): Call
+ real_convert when changing mode class with FLOAT_EXTEND.
+
2011-03-24 Nick Clifton <nickc@redhat.com>
* config/rx/rx.h (LABEL_ALIGN_FOR_BARRIER): Define.
}
else if (GET_CODE (op) == CONST_DOUBLE
- && SCALAR_FLOAT_MODE_P (mode))
+ && SCALAR_FLOAT_MODE_P (mode)
+ && SCALAR_FLOAT_MODE_P (GET_MODE (op)))
{
REAL_VALUE_TYPE d, t;
REAL_VALUE_FROM_CONST_DOUBLE (d, op);
d = real_value_truncate (mode, d);
break;
case FLOAT_EXTEND:
- /* All this does is change the mode. */
+ /* All this does is change the mode, unless changing
+ mode class. */
+ if (GET_MODE_CLASS (mode) != GET_MODE_CLASS (GET_MODE (op)))
+ real_convert (&d, mode, &d);
break;
case FIX:
real_arithmetic (&d, FIX_TRUNC_EXPR, &d, NULL);