2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / mips-sdata-1.c
blobb665d96cd560f4d09343321557342bc9afe1466c
1 /* Check that sdata-accesses are applied regardless of size or ABI. */
2 /* { dg-options -mexplicit-relocs } */
3 /* { dg-do compile { target mips*-*-* } } */
5 struct s { int x[4]; };
6 struct s my_struct __attribute__((__section__(".sdata")));
8 int f() { return my_struct.x[0]; }
10 /* { dg-final { scan-assembler {gp_?rel\(my_struct} } } */