aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2022-02-04 12:07:46 +0100
committerEric Botcazou <ebotcazou@adacore.com>2022-02-04 12:10:05 +0100
commit38948b77dbc16f4c6cf6cff8661bab699b306f03 (patch)
treeb48f5ae1cf788659e4d5f864bebf59981d54af0d /gcc
parentbd14cdceb9c6f4800e25a9fbca635a1d4c06fd32 (diff)
downloadgcc-38948b77dbc16f4c6cf6cff8661bab699b306f03.zip
gcc-38948b77dbc16f4c6cf6cff8661bab699b306f03.tar.gz
gcc-38948b77dbc16f4c6cf6cff8661bab699b306f03.tar.bz2
Empty the base_types vector before (re)populating it
Otherwise Bad Things happen when it is populated several times. gcc/ PR debug/104366 * dwarf2out.cc (dwarf2out_finish): Empty base_types. (dwarf2out_early_finish): Likewise.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/dwarf2out.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
index e60575b..d1e8654 100644
--- a/gcc/dwarf2out.cc
+++ b/gcc/dwarf2out.cc
@@ -32155,6 +32155,7 @@ dwarf2out_finish (const char *filename)
FOR_EACH_CHILD (die, c, gcc_assert (! c->die_mark));
}
#endif
+ base_types.truncate (0);
for (ctnode = comdat_type_list; ctnode != NULL; ctnode = ctnode->next)
resolve_addr (ctnode->root_die);
resolve_addr (comp_unit_die ());
@@ -32999,6 +33000,7 @@ dwarf2out_early_finish (const char *filename)
location related output removed and some LTO specific changes.
Some refactoring might make both smaller and easier to match up. */
+ base_types.truncate (0);
for (ctnode = comdat_type_list; ctnode != NULL; ctnode = ctnode->next)
mark_base_types (ctnode->root_die);
mark_base_types (comp_unit_die ());