This is the mail archive of the
mailing list for the GCC project.
Re: bootstrap failure current CVS in Ada
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 5 Jan 2005 12:00:07 -0500 (EST)
- Subject: Re: bootstrap failure current CVS in Ada
- References: <10501051645.AA02980@vlsi1.ultra.nyu.edu>
On Wed, 5 Jan 2005, Richard Kenner wrote:
This part is the same as the java error (IE it means the block tree is
either incorrect or not marked used properly before lowering).
The debug writers expect that a block is marked used if either their are
used variables *or* the subblocks are used. This problem only hits if a
function is inlined but never makes it through lowering, because lowering
the function fixes up the block tree already.
I'm not sure exactly what you mean here, but can you take a look at
ada/utils.c? The block stuff is pretty localized and it might be easier
for you to see what's wrong than give more details.
I'll look, but what i'm trying to say is the following.
Given a block tree for a function named "foo":
block 1 - vars, but no used vars
subblocks: block 2, block 3
block 2 - vars, but no used vars
subblocks: block 4
block 4 - two used vars
block 3 - no vars
abstract origin: an used inlined function
The debug writers expect block 1, 2, 3, and 4 to all have the used flag
set, or else they won't output all the debug info you expect.
The reasons are:
block 4 because it has used vars
block 3 because it's abstract origin is a used inlined function
(otherwise, we'll miss outputting the inlined function debug info in some
block 2 because block 4 is used
block 1 because block 2 and block 3 are used.
This is a bit counterintuitive, and i'm only stating it as what they
expect. Not what they *should* expect, etc.
I can easily get rid of the requirements if we decide they make no sense,
at the cost of some more walks in the debug writers.
It's easy to prove this to be the case.
If one looks at, for example, gen_block_die in dwarf2out.c, you'll see it
will return in the first statement if the block isn't marked used.
Because it returns early, it never will output the info for the origin of
that block, or the subblocks (the subblock walk happens at the very end of
I've got a workaround for this i plan on submitting in a few moments
that just tells it to stop trying to output debug info for the inlined
thing in this case, because fixing the frontends (particularly java)
is a bit too invasive for 4.0.
It should be fairly trivial to fix for Ada if I understood exactly
what the issue was.