This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/13428] gcc-avr doesn't work non-constant array references


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]