Re: other/10901: non-local goto's (still) don't work on apple-powerpc-darwin
Andrew Pinski <[email protected]>
| Newsgroups | gmane.comp.gcc.prs |
|---|---|
| Message-ID | <[email protected]> |
The following reply was made to PR other/10901; it has been noted by GNATS. From: Andrew Pinski <[email protected]> To: [email protected] Cc: Andrew Pinski <[email protected]>, [email protected], "Gcc-Bugs@Gcc. Gnu. Org" <[email protected]> Subject: Re: other/10901: non-local goto's (still) don't work on apple-powerpc-darwin Date: Wed, 21 May 2003 08:58:21 -0400 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, [email protected] 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: > >