File nov354405.diff of Package gcc41
2007-04-29 Bernd Schmidt <bernd.schmidt@analog.com>
* reload.c (combine_reloads): When trying to use a dying register,
check whether it's uninitialized and don't use if so.
Index: gcc/reload.c
===================================================================
--- gcc/reload.c (revision 124267)
+++ gcc/reload.c (working copy)
@@ -1867,7 +1867,12 @@
|| ! (TEST_HARD_REG_BIT
(reg_class_contents[(int) rld[secondary_out].class],
REGNO (XEXP (note, 0)))))))
- && ! fixed_regs[REGNO (XEXP (note, 0))])
+ && ! fixed_regs[REGNO (XEXP (note, 0))]
+ /* Check that we don't use a hardreg for an uninitialized
+ pseudo. See also find_dummy_reload(). */
+ && (ORIGINAL_REGNO (XEXP (note, 0)) < FIRST_PSEUDO_REGISTER
+ || ! bitmap_bit_p (ENTRY_BLOCK_PTR->il.rtl->global_live_at_end,
+ ORIGINAL_REGNO (XEXP (note, 0)))))
{
rld[output_reload].reg_rtx
= gen_rtx_REG (rld[output_reload].outmode,