From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13614 invoked by alias); 29 Jun 2011 11:29:54 -0000 Received: (qmail 13605 invoked by uid 22791); 29 Jun 2011 11:29:54 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mo-p00-ob.rzone.de (HELO mo-p00-ob.rzone.de) (81.169.146.161) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Jun 2011 11:29:38 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT2k715jHQaJercGObUOFkj18odoYNahU4Q== X-RZG-CLASS-ID: mo00 Received: from [192.168.0.22] (business-188-111-022-002.static.arcor-ip.net [188.111.22.2]) by post.strato.de (klopstock mo58) (RZmta 25.18) with ESMTPA id p00783n5TAbQPL ; Wed, 29 Jun 2011 13:25:46 +0200 (MEST) Message-ID: <4E0B0BB7.9040107@gjlay.de> Date: Wed, 29 Jun 2011 12:11:00 -0000 From: Georg-Johann Lay User-Agent: Thunderbird 2.0.0.24 (X11/20100302) MIME-Version: 1.0 To: Denis Chertykov CC: gcc-patches@gcc.gnu.org, "Eric B. Weddington" , Anatoly Sokolov Subject: Re: Ping #1: [Patch, AVR]: Fix PR34734 References: <4DFF4EFE.3080006@gjlay.de> <4E09B29D.50809@gjlay.de> <4E0ADBEF.1040005@gjlay.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg02223.txt.bz2 Denis Chertykov wrote: > 2011/6/29 Georg-Johann Lay : >> Denis Chertykov wrote: >>> 2011/6/28 Georg-Johann Lay : >>>> http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01462.html >>>> >>>> Georg-Johann Lay wrote: >>>>> PR34734 produces annoying, false warnings if __attribute__((progmem)) >>>>> is used in conjunction with C++. DECL_INITIAL is not yet set up in >>>>> avr_handle_progmem_attribute. >>>>> >>>>> Johann >>>>> >>>>> PR target/34734 >>>>> * config/avr/avr.c (avr_handle_progmem_attribute): Move warning >>>>> about uninitialized data attributed 'progmem' from here... >>>>> (avr_encode_section_info): ...to this new function. >>>>> (TARGET_ENCODE_SECTION_INFO): New define. >>>>> (avr_section_type_flags): For data in ".progmem.data", remove >>>>> section flag SECTION_WRITE. >>>> avr_encode_section_info is good place to emit the warning: >>>> DECL_INITIAL has stabilized for C++, the warning will appear even for >>>> unused variables that will eventually be thrown away, and the warning >>>> appears only once (new_decl_p). >>> Approved. >>> >>> Denis. >> Is this a patch that should be backported? >> 4.6? >> 4.5? >> >> It's not fix for "bug or doc" but very annoying, false warning. > > You can backport it if you want. > > I'm usually didn't backport such patches. > > Denis. Ok, maybe Eric or Anatoly have some preference for 4.5/4.6. Applied to 4.7 together with following corrigendum: Index: config/avr/avr.c =================================================================== --- config/avr/avr.c (revision 175628) +++ config/avr/avr.c (working copy) @@ -5161,7 +5161,7 @@ avr_section_type_flags (tree decl, const /* Implement `TARGET_ENCODE_SECTION_INFO'. */ static void -avr_encode_section_info (tree decl, rtx rtl ATTRIBUTE_UNUSED, +avr_encode_section_info (tree decl, rtx rtl, int new_decl_p) { /* In avr_handle_progmem_attribute, DECL_INITIAL is not yet @@ -5177,6 +5177,8 @@ avr_encode_section_info (tree decl, rtx "uninitialized variable %q+D put into " "program memory area", decl); } + + default_encode_section_info (decl, rtl, new_decl_p); }