aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/avr/pr88253.c
blob: 7fa7e4efc691b748cdc98e7684f4c27e8ab58fea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-options "-Os -w" } */
 
static int aRead() __attribute__((always_inline));
static int aRead() {
    unsigned char h,l;
    l = (*(volatile unsigned char *)(0x78)) ;
    h = (*(volatile unsigned char *)(0x79)) ;
    return (h<<8) | l;
}
 
int main() {
    volatile unsigned char x;
     x = aRead()^42;
 }
 /* { dg-final { scan-assembler "lds r\\d+,121" } } */