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