1 /* { dg-do compile } */ 2 /* { dg-options "-O2 -mno-cache-volatile" } */ 3 /* { dg-final { scan-assembler "ldwio" } } */ 4 /* { dg-final { scan-assembler "stwio" } } */ 5 6 /* Make sure -mno-cache-volatile generates I/O variants of the load and 7 stores to foo. */ 8 9 extern volatile int foo; 10 11 int read_foo(void)12read_foo (void) 13 { 14 return foo; 15 } 16 17 void write_foo(int x)18write_foo (int x) 19 { 20 foo = x; 21 } 22