Fix incorrect use of cmpldi in 32-bit PPC code.
[glibc.git] / elf / tst-tlsmod3.c
blob5c456ee2da473271383308b816b2a34b20c1e8da
1 #include <stdio.h>
3 #include <tls.h>
5 #include "tls-macros.h"
7 extern int in_dso (int n, int *caller_foop);
9 COMMON_INT_DEF(comm_n);
14 int
15 in_dso2 (void)
17 int *foop;
18 int result = 0;
19 static int n;
20 int *np;
22 puts ("foo"); /* Make sure PLT is used before macros. */
23 asm ("" ::: "memory");
25 foop = TLS_GD (foo);
26 np = TLS_GD (comm_n);
28 if (n != *np)
30 printf ("n = %d != comm_n = %d\n", n, *np);
31 result = 1;
34 result |= in_dso (*foop = 42 + n++, foop);
36 *foop = 16;
38 return result;