aboutsummaryrefslogtreecommitdiff
path: root/gcc
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
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')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/dwarf2out.c4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/debug/pr43010.C8
4 files changed, 22 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e680a14..6ef99e6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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-10 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.c (find_barrier): Skip call insn with a REG_EH_REGION
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. */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 273636c..0829924 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-02-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/43010
+ * g++.dg/debug/pr43010.C: New test.
+
2010-02-10 Richard Guenther <rguenther@suse.de>
PR c/43007
diff --git a/gcc/testsuite/g++.dg/debug/pr43010.C b/gcc/testsuite/g++.dg/debug/pr43010.C
new file mode 100644
index 0000000..24b5b27
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/pr43010.C
@@ -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