This is the mail archive of the gcc@gcc.gnu.org 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]

wild load in gcc3


This seems to have been introduced recently.  On my port it shows up in 
gcc.c-torture/compile/20010408-1.c when built with -O3.  It is connected 
with the CALL_PLACEHOLDER stuff for tail recursion, so maybe
whoever's been working on that could look at it.  The sequence is this:

expand_call() generates the PLACEHOLDER.  The tail recursion code ends 
with a branch to the beginning of the function; the target label is 
marked PRESERVE so it won't be deleted.  Also, this label is remembered
in the PLACEHOLDER.

But it may happen that this label is followed by another label, in which 
case:

mark_jump_label() changes the branch in the tail recursion code to point 
to the later label.  It does not set the PRESERVE bit on the new label 
or change the label recorded in the PLACEHOLDER.

cleanup_cfg() thinks the new label isn't worth preserving and deletes it.

If the tail recursion code is eventually selected for the PLACEHOLDER, 
it contains a branch to a label that doesn't exist.  A Bad Thing, 
although since this is a compile-only test it may not fault on your 
machine.

I'm not sure how best to fix it.  mark_jump_label() would be my guess.



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