This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c/8467: Bug in sibling call optimization
- From: Franz dot Sirl-kernel at lauterbach dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 5 Nov 2002 20:25:42 -0000
- Subject: c/8467: Bug in sibling call optimization
- Reply-to: Franz dot Sirl-kernel at lauterbach dot com
>Number: 8467
>Category: c
>Synopsis: Bug in sibling call optimization
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Nov 05 12:26:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Franz.Sirl-kernel@lauterbach.com
>Release: gcc-3.2.1pre, gcc-3.3exp
>Organization:
>Environment:
powerpc-linux-gnu
>Description:
The appended testcase aborts if compiled with -O2, adding -fno-optimize-sibling-calls makes it pass.
This is a regression from gcc-2.95.4.
>How-To-Repeat:
extern void abort (void);
extern void exit (int);
int aim_callhandler(int sess, int conn, unsigned short family, unsigned short type)
{
static int i = 0;
if (!conn)
return 0;
if (type == 0xffff)
{
return 0;
}
if (i >= 1)
abort ();
i++;
return aim_callhandler(sess, conn, family, 0xffff);
}
int main (void)
{
aim_callhandler (0, 1, 0, 0);
exit (0);
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: