+2004-04-29 Matthias Klose <doko@debian.org>
+
+ Backport:
+
+ 2004-03-04 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR optimization/14235
+ * expr.c (expand_expr_real) <NOP_EXPR>: Return a new
+ pseudo when converting from a sub-word source to a
+ larger-than-word register which conflicts with the source.
+
2004-04-29 Jakub Jelinek <jakub@redhat.com>
* config/sparc/sparc.h (FLOATDITF2_LIBCALL, FIX_TRUNCTFDI2_LIBCALL,
return
convert_to_mode (mode, op0,
TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 0))));
- else
- convert_move (target, op0,
- TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 0))));
+
+ /* Check if convert_move may do the conversion by using a low-part,
+ after clobbering the whole target which is known to conflict with
+ the source. In this case, play safe and make a new pseudo. */
+ if (GET_CODE (target) == REG
+ && GET_MODE_BITSIZE (GET_MODE (op0)) < BITS_PER_WORD
+ && GET_MODE_BITSIZE (mode) > BITS_PER_WORD
+ && ! safe_from_p (target, TREE_OPERAND (exp, 0), 1))
+ target = gen_reg_rtx (mode);
+
+ convert_move (target, op0,
+ TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 0))));
return target;
case VIEW_CONVERT_EXPR:
+2004-04-29 Matthias Klose <doko@debian.org>
+
+ Backport:
+
+ 2004-03-04 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * gcc.c-torture/compile/20040304-1.c: New test.
+
2004-04-20 Paul Brook <paul@codesourcery.com>
PR 2123