public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* optimization/10837: noreturn attribute causes no sibling calling optimization
@ 2003-05-17 17:16 pinskia
0 siblings, 0 replies; only message in thread
From: pinskia @ 2003-05-17 17:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 10837
>Category: optimization
>Synopsis: noreturn attribute causes no sibling calling optimization
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat May 17 17:16:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Andrew Pinski
>Release: GNU C version 3.4 20030516 and GNU C version 3.4 20030517
>Organization:
>Environment:
powerpc-apple-darwin6.6 and i686-pc-linux-gnu
>Description:
noreturn attribute on a function causes sibling calling optimization not to be able to be done, so it causes more code to be executed then needed.
>How-To-Repeat:
cat >tt.c <<EOF
void temp()
{
abort();
}
void temp2() __attribute__((__noreturn__));
void temp1()
{
temp2();
}
void temp3();
void temp4()
{
temp3();
}
EOF
gcc -O3 -fomit-frame-pointer tt.c -S
look at the asm and see that temp4 has the optimization but temp1 does not.
>Fix:
if the attrubute is on a function, act like it is a return statement also, so that the sibiling call optimization will always work with that one.
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-05-17 17:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-17 17:16 optimization/10837: noreturn attribute causes no sibling calling optimization pinskia
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).