Automatic date update in version.in
[binutils-gdb.git] / ld / testsuite / ld-x86-64 / pr25416-5a.c
blob9d820a1911d0303dd189ac1a5bdb77d94dff9c0b
1 #include <stdlib.h>
2 #include <stdio.h>
4 __thread int bar = 301;
6 extern int *test1 (int);
7 extern int *test2 (int);
8 extern int *test3 (int);
10 int
11 main ()
13 int *p;
14 p = test1 (30);
15 if (*p != 30)
16 abort ();
17 *p = 40;
18 test1 (40);
19 p = test2 (301);
20 if (*p != 301)
21 abort ();
22 if (p != &bar)
23 abort ();
24 *p = 40;
25 test2 (40);
26 p = test3 (40);
27 if (*p != 40)
28 abort ();
29 *p = 50;
30 test3 (50);
31 puts ("PASS");
32 return 0;