diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2010-06-25 21:11:32 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2010-06-25 21:11:32 +0000 |
commit | e0a80069baa67f2791ecaeaf5301a982428f29c3 (patch) | |
tree | f23474a4079ad669c404a6250463d5ebed00ad76 | |
parent | 01349049e8a5e3d82ea0344c7628024a7c936a3a (diff) | |
download | gcc-e0a80069baa67f2791ecaeaf5301a982428f29c3.zip gcc-e0a80069baa67f2791ecaeaf5301a982428f29c3.tar.gz gcc-e0a80069baa67f2791ecaeaf5301a982428f29c3.tar.bz2 |
re PR debug/44610 (VTA produces wrong variable location information)
PR debug/44610
* simplify-rtx.c (delegitimize_mem_from_attrs): Don't use a base
address if the offset is unknown.
From-SVN: r161413
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/simplify-rtx.c | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2ce7507..5b08e5d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-06-25 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. + 2010-06-25 Douglas B Rupp <rupp@gnat.com> * dwarf2out.c (dwarf2out_vms_debug_main_pointer): New function. diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index be63198..3a30e88 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -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); |