diff options
author | Cary Coutant <ccoutant@google.com> | 2013-04-18 18:55:18 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@gcc.gnu.org> | 2013-04-18 11:55:18 -0700 |
commit | 6f5a366a60e2ee3b3d9ea3500cab1d2de63a6e72 (patch) | |
tree | 353f52b60af40c2be9736e938affef6cba335dbd /gcc/dwarf2out.c | |
parent | 89cbb85b5fd8899fe370ecc4573780685c8487fa (diff) | |
download | gcc-6f5a366a60e2ee3b3d9ea3500cab1d2de63a6e72.zip gcc-6f5a366a60e2ee3b3d9ea3500cab1d2de63a6e72.tar.gz gcc-6f5a366a60e2ee3b3d9ea3500cab1d2de63a6e72.tar.bz2 |
dwarf2out.c (output_pubnames): Check die_perennial_p of parent instead of die_mark.
gcc/
* dwarf2out.c (output_pubnames): Check die_perennial_p of
parent instead of die_mark.
gcc/testsuite/
* g++.dg/debug/dwarf2/pubnames-2.C: Add -fno-debug-types-section.
* g++.dg/debug/dwarf2/pubnames-3.C: New test case.
From-SVN: r198067
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 2475ade..b067b86 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -9018,11 +9018,13 @@ output_pubnames (vec<pubname_entry, va_gc> *names) /* Enumerator names are part of the pubname table, but the parent DW_TAG_enumeration_type die may have been pruned. Don't output them if that is the case. */ - if (pub->die->die_tag == DW_TAG_enumerator && !pub->die->die_mark) + if (pub->die->die_tag == DW_TAG_enumerator && + (pub->die->die_parent == NULL + || !pub->die->die_parent->die_perennial_p)) continue; /* We shouldn't see pubnames for DIEs outside of the main CU. */ - if (names == pubname_table) + if (names == pubname_table && pub->die->die_tag != DW_TAG_enumerator) gcc_assert (pub->die->die_mark); if (names != pubtype_table |