From: Franz Sirl Date: Mon, 11 Nov 2002 20:55:31 +0000 (+0000) Subject: re PR c/8467 (Bug in sibling call optimization) X-Git-Tag: releases/gcc-3.2.1~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95d43544adea17b66ba83dcf8245d074abd52221;p=thirdparty%2Fgcc.git re PR c/8467 (Bug in sibling call optimization) 2002-11-11 Franz Sirl PR c/8467 * gcc.c-torture/execute/20021111-1.c From-SVN: r59023 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 30d0750b86ce..a4cb140a1586 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2002-11-11 Franz Sirl + + PR c/8467 + * gcc.c-torture/execute/20021111-1.c + 2002-11-11 Nathan Sidwell PR c++/7788 diff --git a/gcc/testsuite/gcc.c-torture/execute/20021111-1.c b/gcc/testsuite/gcc.c-torture/execute/20021111-1.c new file mode 100644 index 000000000000..b81fa0b0f88e --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20021111-1.c @@ -0,0 +1,31 @@ +/* Origin: PR c/8467 */ + +extern void abort (void); +extern void exit (int); + +int aim_callhandler(int sess, int conn, unsigned short family, unsigned short type); + +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, (unsigned short) 0xffff); +} + +int main (void) +{ + aim_callhandler (0, 1, 0, 0); + exit (0); +}