other/10901: non-local goto's (still) don't work on apple-powerpc-darwin
Andrew Pinski
pinskia@physics.uc.edu
Wed May 21 13:57:00 GMT 2003
This should be target, as it only effects powerpc-apple-darwin.
In 3.4 (do not know about 3.3):
It looks like the register that is holding the pic address is
overwritten in bar so when the jump happens the pic register now holds
the pic for bar, not for main so it prints out some garbage.
It looks like it should save and restore it in r30 like stack register
is.
A workaround in 3.4 for applications is to use -mdynamic-no-pic which
will get rid of the pic code.
Thanks,
Andrew Pinski
On Wednesday, May 21, 2003, at 06:15 US/Eastern, gcc@microbizz.nl wrote:
> extern int puts (const char *);
> extern void abort (void);
>
> int main (void)
> {
> __label__ l1;
>
> void foo (void)
> {
>
> void bar (void)
> {
> puts ("goto l1");
> goto l1;
> }
>
> bar ();
> }
>
> foo ();
> abort ();
> l1:
> puts ("label l1");
> return 0;
> }
>> How-To-Repeat:
> gcc nonlocalgoto.c -o nonlocalgoto -O3
> gcc nonlocalgoto.c -o nonlocalgoto -O0
>
>> Fix:
>
>> Release-Note:
>> Audit-Trail:
>> Unformatted:
>
>
More information about the Gcc-bugs
mailing list