From 92e8e53a31939ed5c4697c5e0a0b16af4a357bc3 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 10 Feb 2010 16:02:56 +0100 Subject: re PR debug/43010 (ICE with -femit-struct-debug-baseonly) PR debug/43010 * dwarf2out.c (retry_incomplete_types): Don't call gen_type_die if no debug info should be emitted for it. * g++.dg/debug/pr43010.C: New test. From-SVN: r156657 --- gcc/dwarf2out.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/dwarf2out.c') diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 0fd93cb..96b0c9f 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -17162,7 +17162,9 @@ retry_incomplete_types (void) int i; for (i = VEC_length (tree, incomplete_types) - 1; i >= 0; i--) - gen_type_die (VEC_index (tree, incomplete_types, i), comp_unit_die); + if (should_emit_struct_debug (VEC_index (tree, incomplete_types, i), + DINFO_USAGE_DIR_USE)) + gen_type_die (VEC_index (tree, incomplete_types, i), comp_unit_die); } /* Determine what tag to use for a record type. */ -- cgit v1.1