From patchwork Thu Jan 12 15:25:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [AVR] Fix PR51756 Date: Thu, 12 Jan 2012 05:25:01 -0000 From: Georg-Johann Lay X-Patchwork-Id: 135640 Message-Id: <4F0EFB4D.1070106@gjlay.de> To: gcc-patches@gcc.gnu.org Cc: Denis Chertykov , Eric Weddington This PR prints a false warning because missing DECL_EXTERNAL test in avr_encode_section_info that checks if progmem variables come with initializer or not. Ok for trunk? PR target/51756 * config/avr/avr.c (avr_encode_section_info): Test for absence of DECL_EXTERNAL when checking for initializers of progmem variables. Johann --- Index: gcc/config/avr/avr.c =================================================================== --- gcc/config/avr/avr.c (revision 183058) +++ gcc/config/avr/avr.c (working copy) @@ -7222,6 +7222,7 @@ avr_encode_section_info (tree decl, rtx if (new_decl_p && decl && DECL_P (decl) && NULL_TREE == DECL_INITIAL (decl) + && !DECL_EXTERNAL (decl) && avr_progmem_p (decl, DECL_ATTRIBUTES (decl))) { warning (OPT_Wuninitialized,