]> git.ipfire.org Git - thirdparty/glibc.git/blame - elf/tst-tlsmod18a.c
install.texi: Build was tested with binutils 2.41 (just released)
[thirdparty/glibc.git] / elf / tst-tlsmod18a.c
CommitLineData
41e25904
UD
1#include <stdio.h>
2
3#ifndef N
4# define N 0
5#endif
6
7static __thread int var = 4;
8
9int
10test (void)
11{
12 int *p = &var;
13 /* GCC assumes &var is never NULL, add optimization barrier. */
14 asm volatile ("" : "+r" (p));
15 if (p == NULL || *p != 4)
16 {
17 printf ("fail %d %p\n", N, p);
18 return 1;
19 }
20 return 0;
21}