From patchwork Sat Mar 1 18:24:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 325474 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 335952C00C3 for ; Sun, 2 Mar 2014 05:25:24 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; q=dns; s=default; b=UfpVzXDwXDHdoFZQI 0BJCzJadT4nk4FAUZKCsxc4dT3I4fkXxv/wqUOLBk6XuqYK/mPs0zz48DWiayJRV lYtxI/xBRJlwmtcbNyYwQ7v2MKqkqQqVCqzdGa248Umw8GiqabTVJq683yb0bspq 5Ckmv3OKb3QuzaGx+TJMBHaBos= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; s=default; bh=NUyvsGoSrgWnBIlhEwJiCKA EULI=; b=ZQBymGGfLKZeQQYoBbs9w8qiqyQEpRtVZfvqW7Sf2ccgowGyRddYYz7 L1gncAN+7CDuOmSjYXe34DrhmNYpDx9RosIdH9Qc/cDARKIeLZpk+deLEPmEmmo9 +eEpuLDxFTS1Uvmv8WYf7Z5YYwbyASPbUbASbzqlRh9B6jCWuvTw= Received: (qmail 29947 invoked by alias); 1 Mar 2014 18:25:17 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 29930 invoked by uid 89); 1 Mar 2014 18:25:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: aserp1040.oracle.com Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sat, 01 Mar 2014 18:25:15 +0000 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s21IPCw5016117 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 1 Mar 2014 18:25:12 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s21IPAGb028748 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sat, 1 Mar 2014 18:25:11 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s21IPAtk019202; Sat, 1 Mar 2014 18:25:10 GMT Received: from [192.168.1.4] (/79.43.235.49) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 01 Mar 2014 10:25:10 -0800 Message-ID: <531225E9.7080105@oracle.com> Date: Sat, 01 Mar 2014 19:24:41 +0100 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Jason Merrill , "gcc-patches@gcc.gnu.org" Subject: Re: [C++ Patch] PR 60314 (ICE with decltype(auto)) References: <530C6A6D.8060606@oracle.com> <530F922E.4000406@redhat.com> <53106556.2010208@oracle.com> <5310B063.5050302@redhat.com> In-Reply-To: <5310B063.5050302@redhat.com> X-IsSubscribed: yes Hi, On 02/28/2014 04:50 PM, Jason Merrill wrote: > OK, thanks. Applied. I have just noticed (sorry) that get_AT_ref (thus get_AT) isn't trivial at all, thus I propose to apply the below. Is it Ok with you? Thanks, Paolo. ////////////////////// 2014-03-01 Paolo Carlini * dwarf2out.c (gen_subprogram_die): Tidy. Index: dwarf2out.c =================================================================== --- dwarf2out.c (revision 208243) +++ dwarf2out.c (working copy) @@ -18028,11 +18028,13 @@ gen_subprogram_die (tree decl, dw_die_ref context_ /* If the prototype had an 'auto' or 'decltype(auto)' return type, emit the real type on the definition die. */ - if (is_cxx() && debug_info_level > DINFO_LEVEL_TERSE - && (get_AT_ref (old_die, DW_AT_type) == auto_die - || get_AT_ref (old_die, DW_AT_type) == decltype_auto_die)) - add_type_attribute (subr_die, TREE_TYPE (TREE_TYPE (decl)), - 0, 0, context_die); + if (is_cxx() && debug_info_level > DINFO_LEVEL_TERSE) + { + dw_die_ref die = get_AT_ref (old_die, DW_AT_type); + if (die == auto_die || die == decltype_auto_die) + add_type_attribute (subr_die, TREE_TYPE (TREE_TYPE (decl)), + 0, 0, context_die); + } } } else