This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [3.4] Fix C structure nesting for dwarf2out

On Tue, Jan 25, 2005 at 02:36:40PM -0500, Daniel Jacobowitz wrote:
> There's a bug in gcc 3.4.x which causes a test like this:
> struct a;
> struct b {
>   struct a *a1;
> };
> struct a {
>   int b2;
> };
> int foo (struct b *b3) { return b3->a1->b2; }
> to output DWARF-2 information where struct a's definition is a child of
> struct b.  This causes GDB to miss struct a until it has read in a full
> symbol table.
> The bug was caused by TRANSLATION_UNIT_DECL support; scope_die_for gets one
> of these for TYPE_CONTEXT when it expects NULL.  Mark fixed this on the
> Solaris 10 branch a couple of months ago, and I'd like to apply the fix to
> 3.4.  OK?
> I don't think the patch is necessary for HEAD; even with -combine, the
> context always seems to be NULL by that point.  Geoff and Zack, I've copied
> you hoping that one of you can confirm that the test for NULL_TREE is safe
> again now... Mark said something about a lowering pass which removes the
> T_U_Ds?

All that testing and I forgot to add...

Bootstrapped and tested on x86_64-unknown-linux-gnu, no regressions in
either the GCC or GDB testsuites.

Daniel Jacobowitz

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]