public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/2243: Misplacement of label at start of function.
@ 2002-04-25 16:08 rth
0 siblings, 0 replies; 3+ messages in thread
From: rth @ 2002-04-25 16:08 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, voel
Synopsis: Misplacement of label at start of function.
State-Changed-From-To: analyzed->closed
State-Changed-By: rth
State-Changed-When: Thu Apr 25 16:08:27 2002
State-Changed-Why:
Not a bug. A label with no source branch *within the function*
has no fixed location.
One may *not* branch to the label from outside the function.
See http://gcc.gnu.org/onlinedocs/gcc-3.0/gcc_5.html#SEC69.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=2243
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c/2243: Misplacement of label at start of function.
@ 2001-10-30 13:53 neil
0 siblings, 0 replies; 3+ messages in thread
From: neil @ 2001-10-30 13:53 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, voel
Synopsis: Misplacement of label at start of function.
State-Changed-From-To: open->analyzed
State-Changed-By: neil
State-Changed-When: Tue Oct 30 13:53:22 2001
State-Changed-Why:
Confirmed as a bug.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=2243&database=gcc
^ permalink raw reply [flat|nested] 3+ messages in thread
* c/2243: Misplacement of label at start of function.
@ 2001-04-01 0:00 voel
0 siblings, 0 replies; 3+ messages in thread
From: voel @ 2001-04-01 0:00 UTC (permalink / raw)
To: gcc-gnats
>Number: 2243
>Category: c
>Synopsis: Misplacement of label at start of function.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Fri Mar 09 07:56:03 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Rasmus Erik Voel Jensen
>Release: gcc version 2.95.2 19991024 (release) (andalso CodeSourcery's Online Test Compilation)
>Organization:
>Environment:
Linux 2.2.16-3, i686
>Description:
Labels in the start of a function is placed at the function
entry instead of inside the function if the following
conditions hold:
* the source is compiled on the i386-platform.
* optimization is enabled (not run with -O0).
* there is no goto's to the label.
>How-To-Repeat:
Compile the following code with ``gcc -O1 labelerr.c''. If
you then look at the objectcode it is clear that the prelude-
size > 0 (ebp is pushed on the stack, and the stackpointer
is saved).
labelerr.c:
/*
* The label should be after the prelude, such that a jump
* to it would not inflect a new stackframe.
* It is misplaced if the code is optimized end there is no
* goto to the label. It is only observed on the ia-32 arch.
*/
int
main(argv, argc)
char **argv;
int argc;
{
label:
printf("Preludesize = %x\n", &&label-((void *)main));
return 1;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-04-25 23:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-25 16:08 c/2243: Misplacement of label at start of function rth
-- strict thread matches above, loose matches on Subject: below --
2001-10-30 13:53 neil
2001-04-01 0:00 voel
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).