1 /* This testcase ICEd on IA-32 because the backend was inconsistent whether 2 to allow addends for @dtpoff relocs or not. */ 3 /* { dg-do compile } */ 4 /* { dg-options "-O2 -fpic" } */ 5 6 struct S { 7 int s0, s1, s2, s3; 8 }; 9 static __thread struct S x; 10 extern void abort (void); 11 extern void exit (int); 12 13 void foo(struct S * s)14foo (struct S *s) 15 { 16 s->s2 = 231; 17 } 18 19 void bar(void)20bar (void) 21 { 22 if (x.s0 == 231 || x.s2 != 231) 23 abort (); 24 } 25 26 int main()27main () 28 { 29 foo (&x); 30 bar (); 31 exit (0); 32 } 33