3 /* { dg-options "-O2 -fpic" } */
4 /* { dg-require-effective-target tls_runtime } */
5 /* { dg-require-effective-target fpic } */
7 extern void abort (void);
9 int f2 (int, int, int, int);
10 struct s
{ char b
[4]; };
11 __thread
struct s thra
[2];
14 __attribute__((noinline
))
18 for (i
= 0; i
< 4; i
++)
21 for (j
= 0; j
< 4; j
++)
22 tot
+= f2 (a1
, a2
, i
, j
);
23 *(&thra
[0].b
[0] + i
) = tot
;
28 __attribute__((noinline
))
29 f2 (int a
, int b
, int c
, int d
)
41 || thra
[0].b
[3] != 18)
44 if (thra
[0].b
[0] != 26
47 || thra
[0].b
[3] != 38)