diff options
Diffstat (limited to 'ld/testsuite/ld-i386/tls-main1.c')
-rw-r--r-- | ld/testsuite/ld-i386/tls-main1.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/tls-main1.c b/ld/testsuite/ld-i386/tls-main1.c new file mode 100644 index 0000000..5c33744 --- /dev/null +++ b/ld/testsuite/ld-i386/tls-main1.c @@ -0,0 +1,29 @@ +#include <stdio.h> +#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 (); + + printf ("PASS\n"); + + return 0; +} |