This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug debug/58150] debug info about definition of enum class not emitted if the declaration was already used in a class


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]