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: r156658
This commit is contained in:
Jakub Jelinek 2010-02-10 16:09:06 +01:00 committed by Jakub Jelinek
parent 19a711c413
commit cdaa27b170
4 changed files with 22 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2010-02-10 Jakub Jelinek <jakub@redhat.com>
PR debug/43010
* dwarf2out.c (retry_incomplete_types): Don't call gen_type_die
if no debug info should be emitted for it.
2010-02-09 Jakub Jelinek <jakub@redhat.com>
Backport from mainline:

View File

@ -13222,7 +13222,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. */

View File

@ -1,3 +1,8 @@
2010-02-10 Jakub Jelinek <jakub@redhat.com>
PR debug/43010
* g++.dg/debug/pr43010.C: New test.
2010-02-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/tree-ssa/inline-4.c: Bind pic locally.

View File

@ -0,0 +1,8 @@
// PR debug/43010
// { dg-do compile }
// { dg-options "-g -femit-struct-debug-baseonly" }
# 1 "foo.C"
# 1 "bar.h" 1
typedef struct { int i; } S __attribute__((aligned));
typedef struct { struct { int i; } j; } T __attribute__((aligned));
# 1 "foo.C" 2