https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69549
--- Comment #14 from Georg-Johann Lay <gjl at gcc dot gnu.org> --- Would be gread if there were additional target hooks: 1) To put vtables in a non-generic address-space (PR43745). Currently, avr-g++ vtables reside in .rodata, which is located in RAM for all the > 200 devices that don't provide a linear memory view. 2) A hook that rejects code like this (on avr-g++): int volatile v; extern __flash int var; const __flash int var = v; That code is invalid because it is not possible on AVR to write to flash memory (aka. __flash) after load time. So there should be an error that v isn't computable at load time, and a note that initializers for __flash objects must be computable at load time (or earlier).
