aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite/pr20216_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'gold/testsuite/pr20216_main.c')
-rw-r--r--gold/testsuite/pr20216_main.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gold/testsuite/pr20216_main.c b/gold/testsuite/pr20216_main.c
new file mode 100644
index 0000000..3d69787
--- /dev/null
+++ b/gold/testsuite/pr20216_main.c
@@ -0,0 +1,26 @@
+#include <stdlib.h>
+
+extern int * get_gd (void);
+extern void set_gd (int);
+extern int test_gd (int);
+extern int * get_ld (void);
+extern void set_ld (int);
+extern int test_ld (int);
+
+int
+main ()
+{
+ int *p;
+
+ p = get_gd ();
+ set_gd (3);
+ if (*p != 3 || !test_gd (3))
+ abort ();
+
+ p = get_ld ();
+ set_ld (4);
+ if (*p != 4 || !test_ld (4))
+ abort ();
+
+ return 0;
+}