http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52505
Bug #: 52505 Summary: [avr]: __memx address space reading unintentionally from RAM Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: g...@gcc.gnu.org Target: avr The __memx address space reader must determine at runtime from what memory area to read and what instruction to use. To read one byte, ine sequence might look like: ld r24,Z sbrs r25,7 lpm r24,Z This is not correct because if the read is fram flash memory but the address taken as RAM address points to the I/O area, the read might have an effect on I/O register, for example clear a latch or buffer.