1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
/* { dg-do compile } */ /* { dg-options "-O2" } */ static struct s { int x; char y; } s; void set (char c) { s.y = c; } char get (void) { return s.y; } /* { dg-final { scan-assembler-times "%gprel\\(s\\+4\\)\\(gp\\)" 2 } } */