From dff70323a39a34ba26c729f50fe45d78912133e8 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 11 May 2016 13:59:34 +0000 Subject: re PR debug/71057 (ICE in schedule_generic_params_dies_gen, at dwarf2out.c:24142) 2016-05-11 Richard Biener PR debug/71057 * dwarf2out.c (retry_incomplete_types): Set early_dwarf. (dwarf2out_finish): Move retry_incomplete_types call ... (dwarf2out_early_finish): ... here. * g++.dg/debug/pr71057.C: New testcase. From-SVN: r236121 --- gcc/dwarf2out.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gcc/dwarf2out.c') diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 8f192e8..b0173f7 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -19405,11 +19405,13 @@ gen_entry_point_die (tree decl, dw_die_ref context_die) static void retry_incomplete_types (void) { + set_early_dwarf s; int i; for (i = vec_safe_length (incomplete_types) - 1; i >= 0; i--) if (should_emit_struct_debug ((*incomplete_types)[i], DINFO_USAGE_DIR_USE)) gen_type_die ((*incomplete_types)[i], comp_unit_die ()); + vec_safe_truncate (incomplete_types, 0); } /* Determine what tag to use for a record type. */ @@ -27390,10 +27392,6 @@ dwarf2out_finish (const char *filename) resolve_addr (comp_unit_die ()); move_marked_base_types (); - /* Walk through the list of incomplete types again, trying once more to - emit full debugging info for them. */ - retry_incomplete_types (); - if (flag_eliminate_unused_debug_types) prune_unused_types (); @@ -27694,6 +27692,10 @@ dwarf2out_finish (const char *filename) static void dwarf2out_early_finish (void) { + /* Walk through the list of incomplete types again, trying once more to + emit full debugging info for them. */ + retry_incomplete_types (); + /* The point here is to flush out the limbo list so that it is empty and we don't need to stream it for LTO. */ flush_limbo_die_list (); -- cgit v1.1