https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83729
--- Comment #3 from gandalf at winds dot org --- Another regression test case (compile with -O): void code_to_ascii(char buf[1], unsigned int code) { __attribute__((used)) static const char __flash test[5]="ABCDE"; static const char __flash code_tab[32]="0123456789ABCDEFGHJKLMNPRSTUWXYZ"; buf[0]=code_tab[code]; } Variable "test" is correctly placed in section .progmem.data. Variable "code_tab" is incorrectly placed in section .rodata. This causes a problem for programs that are larger than 64KB in size. In my case, "code_to_ascii" is one of the last functions in my .c file, and therefore it is at the very end of the executable. Since "code_tab" appears next to "code_to_ascii" after the 64KB boundary, __flash no longer references the correct area in program memory. GCC 7.2 correctly places both variables in .progmem.data.