public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* other/10901: non-local goto's (still) don't work on apple-powerpc-darwin
@ 2003-05-21 10:33 gcc
0 siblings, 0 replies; 2+ messages in thread
From: gcc @ 2003-05-21 10:33 UTC (permalink / raw)
To: gcc-gnats
>Number: 10901
>Category: other
>Synopsis: non-local goto's (still) don't work on apple-powerpc-darwin
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 21 10:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: gcc@microbizz.nl
>Release: gcc-3.3
>Organization:
>Environment:
apple-powerpc-darwin
>Description:
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:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: other/10901: non-local goto's (still) don't work on apple-powerpc-darwin
@ 2003-05-21 13:06 Andrew Pinski
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Pinski @ 2003-05-21 13:06 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
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:
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-05-21 13:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-21 10:33 other/10901: non-local goto's (still) don't work on apple-powerpc-darwin gcc
2003-05-21 13:06 Andrew Pinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).