aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.apple/special/longcall-prog.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.apple/special/longcall-prog.c')
-rw-r--r--gcc/testsuite/gcc.apple/special/longcall-prog.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.apple/special/longcall-prog.c b/gcc/testsuite/gcc.apple/special/longcall-prog.c
new file mode 100644
index 00000000000..59448507350
--- /dev/null
+++ b/gcc/testsuite/gcc.apple/special/longcall-prog.c
@@ -0,0 +1,17 @@
+#include <stdio.h>
+
+/* declare all externally visible functions in libweak.c */
+int dy_foo (char *, int);
+
+main ()
+{
+ int answer, x=41;
+ char *str = "foostr";
+ printf ("%s begins:\n", __FILE__);
+ answer = dy_foo (str, x);
+ printf ("dy_foo (\"%s\", %d) = %d", str, x, answer);
+ if (answer != 42)
+ printf (" (error!)");
+ printf ("\n%s done.\n", __FILE__);
+ exit (answer != 42);
+}