[Bug debug/94459] Missing c++ debug information for 'auto&' return type
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 7 19:04:54 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94459
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:b5039b7259e64a92f5c077fe4d023556d6b12550
commit r9-8479-gb5039b7259e64a92f5c077fe4d023556d6b12550
Author: Jakub Jelinek <jakub@redhat.com>
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<long>::m1 prints long as return
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 else
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 <ssbssa@yahoo.de>
Jakub Jelinek <jakub@redhat.com>
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)' return
type
to emit type again on definition.
* g++.dg/debug/pr94459.C: New test.
Co-Authored-By: Hannes Domani <ssbssa@yahoo.de>
More information about the Gcc-bugs
mailing list