This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question on tree-nested.c:convert_nl_goto_reference
- From: Ian Lance Taylor <iant at google dot com>
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Cc: gcc at gcc dot gnu dot org
- Date: 10 Nov 2006 08:25:58 -0800
- Subject: Re: Question on tree-nested.c:convert_nl_goto_reference
- References: <10611101249.AA14893@vlsi1.ultra.nyu.edu>
kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:
> I have a test case (involving lots of new code that's not checked in yet)
> that's blowing up with a nonlocal goto and I'm wondering how it ever worked
> because it certainly appears to me that DECL_CONTEXT has to be copied
> from label to new_label. But it isn't. So how are nonlocal gotos
> working?
I think they mostly work because the DECL_CONTEXT of a label isn't
very important. As far as I know we only use it to make sure the
label is emitted.
But I do get a failure in verify_flow_info with the appended test
case. verify_flow_info is only used when checking is enabled, so
maybe that is why people aren't seeing it? Maybe we just need to add
this test case to the testsuite?
Ian
int
main ()
{
int f1 ()
{
__label__ lab;
int f2 ()
{
goto lab;
}
return f2 () + f2 ();
lab:
return 2;
}
if (f1 () != 2)
abort ();
exit (0);
}