This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: other/10901: non-local goto's (still) don't work on apple-powerpc-darwin


The following reply was made to PR other/10901; it has been noted by GNATS.

From: Andrew Pinski <pinskia@physics.uc.edu>
To: gcc@microbizz.nl
Cc: Andrew Pinski <pinskia@physics.uc.edu>, gcc-gnats@gcc.gnu.org,
   "Gcc-Bugs@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:
 >
 >
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]