]> git.ipfire.org Git - thirdparty/glibc.git/blame - elf/tst-tlsmod17a.c
iconv, localedef: avoid floating point rounding differences [BZ #24372]
[thirdparty/glibc.git] / elf / tst-tlsmod17a.c
CommitLineData
60a23f5a
UD
1#include <stdio.h>
2
3#ifndef N
4#define N 0
5#endif
6#define CONCAT1(s, n) s##n
7#define CONCAT(s, n) CONCAT1(s, n)
8
9__thread int CONCAT (v, N) = 4;
10
11int
12CONCAT (tlsmod17a, N) (void)
13{
14 int *p = &CONCAT (v, N);
15 /* GCC assumes &var is never NULL, add optimization barrier. */
16 asm volatile ("" : "+r" (p));
17 if (p == NULL || *p != 4)
18 {
19 printf ("fail %d %p\n", N, p);
20 return 1;
21 }
22 return 0;
23}