From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24960 invoked by alias); 25 Dec 2003 05:51:58 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 24949 invoked by uid 48); 25 Dec 2003 05:51:56 -0000 Date: Thu, 25 Dec 2003 12:03:00 -0000 Message-ID: <20031225055156.24948.qmail@sources.redhat.com> From: "ken at realtronix dot net" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20031218064547.13428.ken@realtronix.net> References: <20031218064547.13428.ken@realtronix.net> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/13428] gcc-avr doesn't work non-constant array references X-Bugzilla-Reason: CC X-SW-Source: 2003-12/txt/msg02645.txt.bz2 List-Id: ------- 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