aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/reloc3lib1.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/reloc3lib1.c')
-rw-r--r--testsuite/reloc3lib1.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/reloc3lib1.c b/testsuite/reloc3lib1.c
new file mode 100644
index 0000000..fd649c6
--- /dev/null
+++ b/testsuite/reloc3lib1.c
@@ -0,0 +1,21 @@
+#include "reloc1.h"
+
+int baz[3] = { 28, 29, 30 };
+
+struct A foo = { 1, &foo, &baz[2] };
+static struct A xfoo = { 2, &xfoo, &baz[1] };
+
+int f1 (void)
+{
+ return 1;
+}
+
+int f2 (void)
+{
+ return f1 () + 1;
+}
+
+struct A *f3 (void)
+{
+ return &xfoo;
+}