diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bd55ea688f4a..da574002f5bf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2000-09-18 Jim Wilson + + * function.c (fixup_var_refs_1, case ZERO_EXTRACT): If we have a + paradoxical subreg, then directly substitute the replacement and + return. + Mon 18-Sep-2000 22:12:44 BST Neil Booth * cpp.texi: Update documentation, including some clarifications, diff --git a/gcc/function.c b/gcc/function.c index 969887fe94f6..f05711487b64 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -2015,6 +2015,14 @@ fixup_var_refs_1 (var, promoted_mode, loc, insn, replacements) if (replacement->new == 0) replacement->new = gen_reg_rtx (GET_MODE (var)); SUBREG_REG (tem) = replacement->new; + + /* The following code works only if we have a MEM, so we + need to handle the subreg here. We directly substitute + it assuming that a subreg must be OK here. We already + scheduled a replacement to copy the mem into the + subreg. */ + XEXP (x, 0) = tem; + return; } else tem = fixup_memory_subreg (tem, insn, 0);