Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / arc / tls-1.c
blob3f7a6d49f59516cd37da3a352c002a9c7ba78077
1 /* { dg-do compile } */
2 /* { dg-require-effective-target tls } */
3 /* { dg-options "-O3 -std=gnu99" } */
5 /* Check if addressing the `pos` member of struct is done via tls
6 mechanism. */
8 struct callchain_cursor {
9 int last;
10 long long pos;
11 } __thread a;
12 void fn1(struct callchain_cursor *p1)
14 p1->pos++;
17 extern void fn3 (void);
19 void fn2(void) {
20 struct callchain_cursor *b = &a;
21 while (1) {
22 fn3();
23 fn1(b);
26 /* { dg-final { scan-assembler "r25,@a@tpoff" } } */