This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] PR: 19885 [4.0/4.1 Regression] avr dwarf-2 support is broken for head 4.0/4.1
- From: Björn Haase <bjoern dot m dot haase at web dot de>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org,tsandnes at norway dot atmel dot com
- Date: Tue, 17 May 2005 23:57:06 +0200
- Subject: Re: [PATCH] PR: 19885 [4.0/4.1 Regression] avr dwarf-2 support is broken for head 4.0/4.1
- References: <firstname.lastname@example.org> <email@example.com> <20050517070730.GA31960@redhat.com>
Am Dienstag, 17. Mai 2005 09:07 schrieb Richard Henderson:
> On Tue, May 17, 2005 at 08:08:33AM +0200, Björn Haase wrote:
> > I could provide a more detailed failure report, e.g. post the generated
> > rtx that causes the bootstrap failure when using --with-dwarf2.
> I was thinking that there's some portion of dwarf2out that isn't
> using ptr_mode properly. So I think this may be useful.
Preliminary analysis, of what is causing PR19885:
1.) "dw2_assemble_integer (int size, rtx x)"
is called with
size == 4
x == minus:HI (symbol_ref:HI ("*.LELT0")) (symbol_ref:HI ("*.LSLT0")))
. This call itself is generated by
dw2_asm_output_delta (int size, const char *lab1, const char *lab2,
const char *comment, ...)
va_start (ap, comment);
ASM_OUTPUT_DWARF_DELTA (asm_out_file, size, lab1, lab2);
gen_rtx_SYMBOL_REF (Pmode, lab1),
gen_rtx_SYMBOL_REF (Pmode, lab2)));
I.e. "dw2_asm_output_delta" passes the parameters size and an expression of
mode Pmode without checking that they are having the same width.
"dw2_asm_output_delta" itself is called by
and the call reads:
dw2_asm_output_delta (DWARF_OFFSET_SIZE, l2, l1,
"Length of Source Line Info");
The problem, therefore always seem to show up, if DWARF_OFFSET_SIZE does not
correspond to the same width as Pmode.
The patch I have suggested is not affected by the problem since it does not
use RTL for implementing the calculation of the difference between the two
lable references but emits the corresponding asm source itself.
Unfortunately, I am lacking the knowledge on how the dwarf2 output generator
is supposed to behave in order to be able to resolve this issue myself.