aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/avr/pr105523.c
blob: fbbf7bf4422770d2ad42f4d71cc97e1ef3ff2eb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-options "-Os -Wall" } */

/* Verify no "array subscript 0 is outside array bounds of" is generated
   for accessing memory addresses in the 0-4096 range. */

typedef __UINT8_TYPE__ uint8_t;

#define SREG (*(volatile uint8_t*) (0x3F + __AVR_SFR_OFFSET__ ))

void bar (void)
{
    SREG = 0;
}