1 /* { dg-do compile } */
2 /* { dg-options "-O" } */
3 /* { dg-final { scan-assembler "gs:" } } */
4 
5 #define uintptr_t __SIZE_TYPE__
6 
7 struct S { int a, b, c; };
8 
9 extern struct S s;
10 
ct_state3(void)11 int ct_state3 (void)
12 {
13   int r;
14   r = *((int __seg_gs *) (uintptr_t) &s.c);
15   return r;
16 }
17