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]

c/8467: Bug in sibling call optimization


>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:


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