aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-02-10 16:02:56 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2010-02-10 16:02:56 +0100
commit92e8e53a31939ed5c4697c5e0a0b16af4a357bc3 (patch)
tree83110c2ee4348a278895f6c6eec8dae6fb85df5c /gcc/dwarf2out.c
parentbd55b817bf00684b9e40208055a036fbbe041912 (diff)
downloadgcc-92e8e53a31939ed5c4697c5e0a0b16af4a357bc3.zip
gcc-92e8e53a31939ed5c4697c5e0a0b16af4a357bc3.tar.gz
gcc-92e8e53a31939ed5c4697c5e0a0b16af4a357bc3.tar.bz2
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
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c4
1 files changed, 3 insertions, 1 deletions
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. */