From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1E97939450E5; Tue, 7 Apr 2020 19:04:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E97939450E5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586286294; bh=qva4ylOfbr464Kok56HHCs2vFJhyeI194XShUYGkCpQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Og/lVLuUOXMK/yBIykbNE5v+s6t5Reg04J2treXJ4d9wP2kIq8KXzMtr7umGnDrsc OoV2ZhHbODtIHtXTiKS76tgcgQOa4sdZoFVt4KDa7ZdnM2EjTG5RNbz9CCWrzH4Mul 391uNGoxbp3Or6albVJ6hUesQPuhDB+uulUwjfZU= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/94459] Missing c++ debug information for 'auto&' return type Date: Tue, 07 Apr 2020 19:04:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2020 19:04:54 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94459 --- Comment #8 from CVS Commits --- The releases/gcc-9 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:b5039b7259e64a92f5c077fe4d023556d6b12550 commit r9-8479-gb5039b7259e64a92f5c077fe4d023556d6b12550 Author: Jakub Jelinek Date: Tue Apr 7 21:01:40 2020 +0200 debug: Improve debug info of c++14 deduced return type [PR94459] On the following testcase, in gdb ptype S::m1 prints long as retu= rn type, but all the other methods show void instead. PR53756 added code to add_type_attribute if the return type is auto/decltype(auto), but we actually should look through references, pointers and qualifiers. Haven't included there DW_TAG_atomic_type, because I think at least ATM one can't use that in C++. Not sure about DW_TAG_array_type or what el= se could be deduced. > http://eel.is/c++draft/dcl.spec.auto#3 says it has to appear as a > decl-specifier. > > http://eel.is/c++draft/temp.deduct.type#8 lists the forms where a template > argument can be deduced. > > Looks like you are missing arrays, pointers to members, and function return > types. 2020-04-04 Hannes Domani Jakub Jelinek PR debug/94459 * dwarf2out.c (gen_subprogram_die): Look through references, pointers, arrays, pointer-to-members, function types and qualifiers when checking if in-class DIE had an 'auto' or 'decltype(auto)' retu= rn type to emit type again on definition. * g++.dg/debug/pr94459.C: New test. Co-Authored-By: Hannes Domani =