Fortran: fix dependency checks for inquiry refs [PR115039]
[official-gcc.git] / gcc / testsuite / gcc.target / nios2 / r2-stio-1.c
blob5aadd20d340dcf66f304aaad6e3ca99e0fe44acc
1 /* { dg-do compile } */
2 /* { dg-options "-O -mgpopt -march=r2" } */
4 /* The ldio/stio builtins must not use GP-relative addresses for
5 small data objects in R2. This is because the address offset field
6 has been reduced to 12 bits in R2, and %gprel is a 16-bit relocation. */
8 extern volatile unsigned int frob;
10 volatile unsigned int frob = 0;
12 void foo (unsigned int val)
14 __builtin_stwio (&frob, val);
17 /* { dg-final { scan-assembler "stwio\\t" } } */
18 /* { dg-final { scan-assembler-not "stwio\\t.*%gprel(frob)" } } */