[Bug target/36533] [4.3/4.4 Regression] Incorrectly assumed aligned_operand
bergner at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Jun 13 22:15:00 GMT 2008
------- Comment #2 from bergner at gcc dot gnu dot org 2008-06-13 22:14 -------
We shouldn't be attempting to call mark_reg_pointer in set_reg_attrs_from_value
for a hard reg, since they can be shared between different values. Andrew
mentioned we maybe shouldn't be calling set_reg_attrs_from_value() with a hard
reg, or we could do the following:
--- emit-rtl.c (revision 134986)
+++ emit-rtl.c (working copy)
@@ -969,14 +969,14 @@ set_reg_attrs_from_value (rtx reg, rtx x
if (MEM_OFFSET (x) && GET_CODE (MEM_OFFSET (x)) == CONST_INT)
REG_ATTRS (reg)
= get_reg_attrs (MEM_EXPR (x), INTVAL (MEM_OFFSET (x)) + offset);
- if (MEM_POINTER (x))
+ if (!HARD_REGISTER_P (reg) && MEM_POINTER (x))
mark_reg_pointer (reg, MEM_ALIGN (x));
}
else if (REG_P (x))
{
if (REG_ATTRS (x))
update_reg_offset (reg, x, offset);
- if (REG_POINTER (x))
+ if (!HARD_REGISTER_P (reg) && REG_POINTER (x))
mark_reg_pointer (reg, REGNO_POINTER_ALIGN (REGNO (x)));
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36533
More information about the Gcc-bugs
mailing list