gcc/testsuite/gcc.target/arc/uncached.c
raw| 1 | /* { dg-do compile } */ |
| 2 | |
| 3 | /* Check 'uncached' type attribute. */ |
| 4 | |
| 5 | typedef volatile unsigned int RwReg __attribute__ ((uncached)); |
| 6 | |
| 7 | typedef struct { |
| 8 | RwReg UART_THR; |
| 9 | int SIDE_DISH; |
| 10 | } UART; |
| 11 | |
| 12 | void uart_putc(UART *port, char c) |
| 13 | { |
| 14 | port->UART_THR = c; |
| 15 | port->SIDE_DISH = c; |
| 16 | } |
| 17 | |
| 18 | /* { dg-final { scan-assembler-times "st\.di" 1 } } */ |