This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13428] gcc-avr doesn't work non-constant array references
- From: "ken at realtronix dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Dec 2003 05:51:56 -0000
- Subject: [Bug c/13428] gcc-avr doesn't work non-constant array references
- References: <20031218064547.13428.ken@realtronix.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From ken at realtronix dot net 2003-12-25 05:51 -------
(In reply to comment #2)
> Can you provide the preprocessed source?
(In reply to comment #7)
> Does this work without PROGMEM at all, make sure that you remove the const?
> Because the attribute only sets the section different so the attribute
cannot be doing
> anything to change the asm.
When I remove the PROGMEM directive from Langs likes below:
const char foo[] PROGMEM = "foo";
const char bar[] PROGMEM = "bar";
PGM_P Langs[2] = {foo, bar};
strcpy_P() works well with constant or variable index array. The source
address is correct now. Therefore, Langs cannot be put in program memory.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13428