[Bug debug/90914] [10 Regression] ICE in schedule_generic_params_dies_gen, at dwarf2out.c:27153
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jun 21 11:44:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90914
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Similar to unused type pruning we have to preserve externs local to functions
since they'll be regenerated otherwise.
Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c (revision 272545)
+++ gcc/dwarf2out.c (working copy)
@@ -29418,6 +29418,10 @@ prune_unused_types_walk (dw_die_ref die)
if (die->die_perennial_p)
break;
+ for (c = die->die_parent; c; c = c->die_parent)
+ if (c->die_tag == DW_TAG_subprogram)
+ break;
+
/* premark_used_variables marks external variables --- don't mark
them here. */
if (get_AT (die, DW_AT_external))
More information about the Gcc-bugs
mailing list