summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/20021111-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/20021111-1.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20021111-1.c31
1 files changed, 31 insertions, 0 deletions
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 000000000..b81fa0b0f
--- /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);
+}