This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/58150] debug info about definition of enum class not emitted if the declaration was already used in a class
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 11 Mar 2018 16:50:40 +0000
- Subject: [Bug debug/58150] debug info about definition of enum class not emitted if the declaration was already used in a class
- Auto-submitted: auto-generated
- References: <bug-58150-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58150
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Sun Mar 11 16:50:08 2018
New Revision: 258434
URL: https://gcc.gnu.org/viewcvs?rev=258434&root=gcc&view=rev
Log:
PR debug/58150
* dwarf2out.c (gen_enumeration_type_die): Don't guard adding
DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
addition of most attributes on !orig_type_die or the attribute not
being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
* g++.dg/debug/dwarf2/enum2.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/debug/dwarf2/enum2.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c
trunk/gcc/testsuite/ChangeLog