Copyright (C) 2002 Free Software Foundation Inc.
Contributed by Hans-Peter Nilsson <hp@bitrange.com> */
-/* { dg-do run { xfail arc-*-* avr-*-* c4x-*-* cris-*-* h8300-*-* i370-*-* i960-*-* ip2k-*-* m32r-*-* m68hc1?-*-* m681?-*-* m680*-*-* m68k-*-* mcore-*-* mips*-*-* mn10300-*-* ns32k-*-* s390*-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa-*-* } } */
+/* { dg-do run { xfail arc-*-* avr-*-* cris-*-* crisv32-*-* h8300-*-* hppa*64*-*-* m32r-*-* m68hc1?-*-* mcore-*-* mn10300-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa-*-* } } */
+/* -mlongcall disables sibcall patterns. */
+/* { dg-skip-if "" { powerpc*-*-* } { "-mlongcall" } { "" } } */
/* { dg-options "-O2 -foptimize-sibling-calls" } */
/* The option -foptimize-sibling-calls is the default, but serves as
(except targets where the test does not work due to the return address
not saved on the regular stack). */
-static void recurser_void1 (void);
-static void recurser_void2 (void);
+extern void abort (void);
+extern void exit (int);
+
+/* Sibcalls are not supported in MIPS16 mode, which has direct calls but
+ not direct jumps. */
+#ifdef __mips
+#define ATTR __attribute__((nomips16))
+#else
+#define ATTR
+#endif
+
+static ATTR void recurser_void1 (void);
+static ATTR void recurser_void2 (void);
extern void track (void);
int n = 0;
reasonably sure is to make them have the same contents (regarding the
n tests). */
-static void
+static void __attribute__((noinline)) ATTR
recurser_void1 (void)
{
if (n == 0 || n == 7 || n == 8)
recurser_void2 ();
}
-static void
+static void __attribute__((noinline)) ATTR
recurser_void2 (void)
{
if (n == 0 || n == 7 || n == 8)