gcc/testsuite/gcc.target/avr/pr105523.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-Os -Wall" } */ |
| 3 | |
| 4 | /* Verify no "array subscript 0 is outside array bounds of" is generated |
| 5 | for accessing memory addresses in the 0-4096 range. */ |
| 6 | |
| 7 | typedef __UINT8_TYPE__ uint8_t; |
| 8 | |
| 9 | #define SREG (*(volatile uint8_t*) (0x3F + __AVR_SFR_OFFSET__ )) |
| 10 | |
| 11 | void bar (void) |
| 12 | { |
| 13 | SREG = 0; |
| 14 | } |