gcc/gcc44-pr44610.patch

33 lines
955 B
Diff

2010-06-23 Alexandre Oliva <aoliva@redhat.com>
PR debug/44610
* simplify-rtx.c (delegitimize_mem_from_attrs): Don't use a base
address if the offset is unknown.
--- gcc/simplify-rtx.c.orig 2010-06-23 01:15:14.000000000 -0300
+++ gcc/simplify-rtx.c 2010-06-23 01:20:21.000000000 -0300
@@ -208,10 +208,11 @@ avoid_constant_pool_reference (rtx x)
rtx
delegitimize_mem_from_attrs (rtx x)
{
+ /* MEMs without MEM_OFFSETs may have been offset, so we can't just
+ use their base addresses as equivalent. */
if (MEM_P (x)
&& MEM_EXPR (x)
- && (!MEM_OFFSET (x)
- || GET_CODE (MEM_OFFSET (x)) == CONST_INT))
+ && MEM_OFFSET (x))
{
tree decl = MEM_EXPR (x);
enum machine_mode mode = GET_MODE (x);
@@ -264,8 +265,7 @@ delegitimize_mem_from_attrs (rtx x)
{
rtx newx;
- if (MEM_OFFSET (x))
- offset += INTVAL (MEM_OFFSET (x));
+ offset += INTVAL (MEM_OFFSET (x));
newx = DECL_RTL (decl);