bootstrap failure current CVS in Ada

Daniel Berlin dberlin@dberlin.org
Wed Jan 5 17:16:00 GMT 2005



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 
cases)
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 
this function)

>    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.
>



More information about the Gcc mailing list