This is the mail archive of the
mailing list for the GCC project.
Re: [RFC] tree-cfg.c: Check that a nonlocal label doesn't appearin the middle of a basic block.
On Wed, 2005-01-19 at 02:33 -0500, Kazu Hirata wrote:
> Hi Andrew,
> > What is happen is that we now have two labels that are computed goto
> > types but only referenced as for just getting the address and not
> > actually reachable otherwise. It might be reasonable to split the
> > BB but that takes up more memory than just allowing this special
> > case since we know that non local gotos and real computed goto would
> > have an abnormal edge to them and not be moved around.
> Is there a local label between those two nonlocal labels?
Which is (I think) the key question.
> Well, we should keep things straight so that we can determine whether
> a given basic block is a target of a nonlocal goto by checking to see
> if the first statement of the basic block is a nonlocal label.
> Alternatively, we can use loop to walk through labels, looking for a
> nonlocal label, but that's probably not desired.
If it can be easily avoided, then I'd like to avoid it :-)
> Whatever we do, we should have clear "grammar" of statements in a
> basic block and check that in tree_verify_flow_info. As far as I have
> learned so far, the "grammar" is something like
> zero or one forced label
> zero or more nonlocal labels
> zero or more local labels
> other statements
> zero or one control stmt
Don't forget user labels, though I have a TODO to go back and re-review
the thread on [re]moving user labels at the tree level.