From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22650 invoked by alias); 5 Dec 2013 14:55:11 -0000 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 Received: (qmail 22635 invoked by uid 89); 5 Dec 2013 14:55:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_40,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: mo-p00-ob.rzone.de Received: from Unknown (HELO mo-p00-ob.rzone.de) (81.169.146.161) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 05 Dec 2013 14:55:08 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT3ol15ykJcYwRP/XHRipPRQwznuLpg== 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 smtp.strato.de (RZmta 32.17 AUTH) with (TLSv1:DHE-RSA-AES256-SHA encrypted) ESMTPSA id 605568pB5ErqaSM ; Thu, 5 Dec 2013 15:53:52 +0100 (CET) Message-ID: <52A0937F.8020105@gjlay.de> Date: Thu, 05 Dec 2013 14:55:00 -0000 From: Georg-Johann Lay User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130911 Thunderbird/17.0.9 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org CC: Denis Chertykov , Eric Weddington Subject: [Patch,avr]: Fix wrong warning PR59396 Content-Type: multipart/mixed; boundary="------------030906030000020905010100" X-SW-Source: 2013-12/txt/msg00529.txt.bz2 This is a multi-part message in MIME format. --------------030906030000020905010100 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 547 This is a fix of a wrong warning for a bas ISR name. The assumption was that if DECL_ASSEMBLER_NAME is set, it would always starts with a *. This is not the case for LTO compiler where the assembler name is the plain name of the function (except an assembler name is set). Thus, do a more restrictive test if the first character of the function name has to be skipped. Ok to commit? Johann PR target/59396 * config/avr/avr.c (avr_set_current_function): If the first char of the function name is skipped, make sure it is actually '*'. --------------030906030000020905010100 Content-Type: text/x-patch; name="pr59396.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr59396.diff" Content-length: 655 Index: config/avr/avr.c =================================================================== --- config/avr/avr.c (revision 205709) +++ config/avr/avr.c (working copy) @@ -599,7 +599,8 @@ avr_set_current_function (tree decl) tree ret = TREE_TYPE (TREE_TYPE (decl)); const char *name; - name = DECL_ASSEMBLER_NAME_SET_P (decl) + name = (DECL_ASSEMBLER_NAME_SET_P (decl) + && '*' == *IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))) /* Remove the leading '*' added in set_user_assembler_name. */ ? 1 + IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)) : IDENTIFIER_POINTER (DECL_NAME (decl)); --------------030906030000020905010100--