https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523
--- Comment #29 from Georg-Johann Lay <gjl at gcc dot gnu.org> --- (In reply to David Brown from comment #20) > This is not an AVR backend issue - it is much wider than that. It is > perhaps reasonable to test a patch just on the AVR, but this needs to be > fixed in the core of gcc. Ok, just the fact that the issue is sitting there for > 1 year now lead me to the conclusion it's an AVR issue... On older AVR devices, SFR area starts at 0x20, but on newer devices it starts at 0x0. There are devices where 0x0 is actually some SFR address like PINB for ATtiny10 just to mention one. At least for AVR, the warning does not make sense for dereferencing volatile pointers to addresses known at compile time. But there are also cases for addresses known only at link time, like with AVR attribute __address__ or __io__. Hence, for any addresses known at link time or earlier (aka. immediates), the warning makes no sense to me, because you cannot allocate them, anyways. (And when you can allocate by means of, say, a memory protection unit, GCC is out of the game.)