This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH]: Fix PR debug/19191 and dwarf-die-7.c
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 29 Dec 2004 15:35:57 -0500 (EST)
- Subject: [PATCH]: Fix PR debug/19191 and dwarf-die-7.c
This fixes both PR debug/19191 (a 4.0 regression) and the failure in
dwarf-die-7.c
What happens is that when we fix up the block tree in lower_bind_expr, we
don't mark the block as used, only as asm_written.
Thus, we end up with the following situation (AFAICT):
before fixup
block 1 (marked used)
|
v
block 2 (marked used), block 3 (marked used), etc
after fixup
block 1 (marked used)
|
v
block 4 (*NOT* marked used)
|
v
block 2 (marked used), block 3 (marked used), etc
The debug info output generator won't bother walking the subblocks if the
parent block isn't marked used, so we never generate info for block 2 or
block 3, which is where the inlined info is.
The attached patch marks the block used if the block that is now it's
"parent" (in the case of block 4, this would be block 1), is marked used,
This is done on assumption that the parent was marked used because either
it has something in it used, or one of it's subblocks was marked used in
the first place. In the first case, it may be true that none of the
subblocks are marked used. When this happens, i believe we will just do a
little extra walking, but not output any extraneous info.
I can't see a way around this without walking the subblocks anyway, though
i'm happy to insert the walk there if someone wants it done there.
This fixes both the PR, and the dwarf-die failure.
Bootstrapped and regtested on i686-pc-linux-gnu.
Okay for mainline?Attachment:
19191.diff
Description: Text document