public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Dwarf2 question
@ 2003-03-26 16:07 Eric Botcazou
  2003-03-26 17:21 ` Falk Hueffner
  2003-03-27  7:54 ` Richard Henderson
  0 siblings, 2 replies; 5+ messages in thread
From: Eric Botcazou @ 2003-03-26 16:07 UTC (permalink / raw)
  To: gcc

Hi,

This is related to high-priority PR target/10114 on Sparc.

GCC dies because it can't generate a memory location for

(gdb) p debug_tree(decl)
 <var_decl 0x40188258 previous_skew
    type <real_type 0x40157bb8 double asm_written DF
        size <integer_cst 0x4014d8e0 constant 64>
        unit size <integer_cst 0x4014db00 constant 8>
        align 64 symtab 137966584 alias set -1 precision 64
        pointer_to_this <pointer_type 0x4015d0f0>>
    used DF file ../pr10114.c line 22 size <integer_cst 0x4014d8e0 64> unit 
size <integer_cst 0x4014db00 8>
    align 64 context <function_decl 0x40188168 REF_SetReference>
    (mem/f:DF (lo_sum:SI (reg/f:SI 16 %l0 [118])
        (symbol_ref:SI ("our_skew"))) [0 our_skew+0 S8 A64]) chain <var_decl 
0x401882d0 new_skew>>

The problem is the LO_SUM inside the MEM, that mem_loc_descriptor doesn't 
know how to handle. It is produced by the reload-after-global-alloc pass 
because the pseudo-reg which used to represent the variable is useless and 
thus eliminated.

Would it make any sense to teach mem_loc_descriptor to pass through the 
LO_SUM in search of a SYMBOL_REF?

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Dwarf2 question
  2003-03-26 16:07 Dwarf2 question Eric Botcazou
@ 2003-03-26 17:21 ` Falk Hueffner
  2003-03-27  7:54 ` Richard Henderson
  1 sibling, 0 replies; 5+ messages in thread
From: Falk Hueffner @ 2003-03-26 17:21 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: gcc

On Wed, 26 Mar 2003, Eric Botcazou wrote:

> This is related to high-priority PR target/10114 on Sparc.
>
> The problem is the LO_SUM inside the MEM, that mem_loc_descriptor doesn't
> know how to handle.

By the way, target/10084 is caused by the same problem, maybe the reports
should be merged.

	Falk


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Dwarf2 question
  2003-03-26 16:07 Dwarf2 question Eric Botcazou
  2003-03-26 17:21 ` Falk Hueffner
@ 2003-03-27  7:54 ` Richard Henderson
  2003-03-27  8:49   ` Eric Botcazou
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2003-03-27  7:54 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: gcc

On Wed, Mar 26, 2003 at 04:06:45PM +0100, Eric Botcazou wrote:
> Would it make any sense to teach mem_loc_descriptor to pass through the 
> LO_SUM in search of a SYMBOL_REF?

It would make sense to make mem_loc_descriptor do:

	case LO_SUM:
	  rtl = XEXP (rtl, 1);
	  /* FALLTHRU */

	case LABEL_REF:
	case CONST:
	case SYMBOL_REF:
	  ...

Alternately, do this in targetm.delegitimize_address.



r~

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Dwarf2 question
  2003-03-27  7:54 ` Richard Henderson
@ 2003-03-27  8:49   ` Eric Botcazou
  2003-03-27  9:18     ` Falk Hueffner
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Botcazou @ 2003-03-27  8:49 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Falk Hueffner, gcc

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]

> It would make sense to make mem_loc_descriptor do:
>
> 	case LO_SUM:
> 	  rtl = XEXP (rtl, 1);
> 	  /* FALLTHRU */
>
> 	case LABEL_REF:
> 	case CONST:
> 	case SYMBOL_REF:
> 	  ...
>
> Alternately, do this in targetm.delegitimize_address.

Thanks. Since the problem shows up on Alpha too, I'm leaning toward your 
first suggestion.

Falk, is the attached patch (against 3.3) sufficient to fix PR target/10084?

-- 
Eric Botcazou

[-- Attachment #2: pr10114.diff --]
[-- Type: text/x-diff, Size: 677 bytes --]

Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.390.2.3
diff -u -p -r1.390.2.3 dwarf2out.c
--- dwarf2out.c	15 Mar 2003 17:00:09 -0000	1.390.2.3
+++ dwarf2out.c	27 Mar 2003 07:37:21 -0000
@@ -8177,6 +8177,11 @@ mem_loc_descriptor (rtl, mode)
 	add_loc_descr (&mem_loc_result, new_loc_descr (DW_OP_deref, 0, 0));
       break;
 
+    case LO_SUM:
+	 rtl = XEXP (rtl, 1);
+
+      /* ... fall through ...  */
+
     case LABEL_REF:
       /* Some ports can transform a symbol ref into a label ref, because
  	 the symbol ref is too far away and has to be dumped into a constant

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Dwarf2 question
  2003-03-27  8:49   ` Eric Botcazou
@ 2003-03-27  9:18     ` Falk Hueffner
  0 siblings, 0 replies; 5+ messages in thread
From: Falk Hueffner @ 2003-03-27  9:18 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: Richard Henderson, gcc

Eric Botcazou <ebotcazou@libertysurf.fr> writes:

> > It would make sense to make mem_loc_descriptor do:
> >
> > 	case LO_SUM:
> > 	  rtl = XEXP (rtl, 1);
> > 	  /* FALLTHRU */
> >
> > 	case LABEL_REF:
> > 	case CONST:
> > 	case SYMBOL_REF:
> > 	  ...
> >
> > Alternately, do this in targetm.delegitimize_address.
> 
> Thanks. Since the problem shows up on Alpha too, I'm leaning toward your 
> first suggestion.
> 
> Falk, is the attached patch (against 3.3) sufficient to fix PR target/10084?

Yes.

-- 
	Falk

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-03-27  8:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-26 16:07 Dwarf2 question Eric Botcazou
2003-03-26 17:21 ` Falk Hueffner
2003-03-27  7:54 ` Richard Henderson
2003-03-27  8:49   ` Eric Botcazou
2003-03-27  9:18     ` Falk Hueffner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).