Commit e0a80069 by Alexandre Oliva Committed by Alexandre Oliva

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
parent 01349049
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> 2010-06-25 Douglas B Rupp <rupp@gnat.com>
* dwarf2out.c (dwarf2out_vms_debug_main_pointer): New function. * dwarf2out.c (dwarf2out_vms_debug_main_pointer): New function.
......
...@@ -208,10 +208,11 @@ avoid_constant_pool_reference (rtx x) ...@@ -208,10 +208,11 @@ avoid_constant_pool_reference (rtx x)
rtx rtx
delegitimize_mem_from_attrs (rtx x) 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) if (MEM_P (x)
&& MEM_EXPR (x) && MEM_EXPR (x)
&& (!MEM_OFFSET (x) && MEM_OFFSET (x))
|| GET_CODE (MEM_OFFSET (x)) == CONST_INT))
{ {
tree decl = MEM_EXPR (x); tree decl = MEM_EXPR (x);
enum machine_mode mode = GET_MODE (x); enum machine_mode mode = GET_MODE (x);
...@@ -264,8 +265,7 @@ delegitimize_mem_from_attrs (rtx x) ...@@ -264,8 +265,7 @@ delegitimize_mem_from_attrs (rtx x)
{ {
rtx newx; rtx newx;
if (MEM_OFFSET (x)) offset += INTVAL (MEM_OFFSET (x));
offset += INTVAL (MEM_OFFSET (x));
newx = DECL_RTL (decl); newx = DECL_RTL (decl);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment