From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30399 invoked by alias); 21 May 2003 13:06:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 30371 invoked by uid 71); 21 May 2003 13:06:00 -0000 Date: Wed, 21 May 2003 13:06:00 -0000 Message-ID: <20030521130600.30370.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Andrew Pinski Subject: Re: other/10901: non-local goto's (still) don't work on apple-powerpc-darwin Reply-To: Andrew Pinski X-SW-Source: 2003-05/txt/msg02289.txt.bz2 List-Id: The following reply was made to PR other/10901; it has been noted by GNATS. From: Andrew Pinski To: gcc@microbizz.nl Cc: Andrew Pinski , gcc-gnats@gcc.gnu.org, "Gcc-Bugs@Gcc. Gnu. Org" 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, 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: > >