aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-08-21 19:11:20 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2007-08-21 19:11:20 +0200
commitd6b3c79757281c980f71f24d62d5b68a0b933d09 (patch)
treef68504d23af2c46621d644dcccfccb7122f4db37 /gcc
parentaf9fc1dd6364fac542ca47b6ddd68866f5aefb50 (diff)
downloadgcc-d6b3c79757281c980f71f24d62d5b68a0b933d09.zip
gcc-d6b3c79757281c980f71f24d62d5b68a0b933d09.tar.gz
gcc-d6b3c79757281c980f71f24d62d5b68a0b933d09.tar.bz2
re PR debug/32610 (ICE in gen_tagged_type_instantiation_die, at dwarf2out.c:12762)
PR debug/32610 * dwarf2out.c (gen_decl_die): Don't call gen_tagged_type_instantiation_die if decl doesn't have tagged type. * gcc.dg/debug/pr32610.c: New test. From-SVN: r127669
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/dwarf2out.c3
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/gcc.dg/debug/pr32610.c14
4 files changed, 25 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4724e16..82b7685 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2007-08-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/32610
+ * dwarf2out.c (gen_decl_die): Don't call
+ gen_tagged_type_instantiation_die if decl doesn't have tagged type.
+
2007-08-21 Paul Brook <paul@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index ec6e121..a03b81a 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -13622,7 +13622,8 @@ gen_decl_die (tree decl, dw_die_ref context_die)
was generated within the original definition of an inline function) we
have to generate a special (abbreviated) DW_TAG_structure_type,
DW_TAG_union_type, or DW_TAG_enumeration_type DIE here. */
- if (TYPE_DECL_IS_STUB (decl) && decl_ultimate_origin (decl) != NULL_TREE)
+ if (TYPE_DECL_IS_STUB (decl) && decl_ultimate_origin (decl) != NULL_TREE
+ && is_tagged_type (TREE_TYPE (decl)))
{
gen_tagged_type_instantiation_die (TREE_TYPE (decl), context_die);
break;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4fc50ce..002f824 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@
2007-08-21 Jakub Jelinek <jakub@redhat.com>
+ PR debug/32610
+ * gcc.dg/debug/pr32610.c: New test.
+
* g++.dg/init/new24.C: New test.
PR middle-end/32912
diff --git a/gcc/testsuite/gcc.dg/debug/pr32610.c b/gcc/testsuite/gcc.dg/debug/pr32610.c
new file mode 100644
index 0000000..d1dae1d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/pr32610.c
@@ -0,0 +1,14 @@
+/* PR debug/32610 */
+/* { dg-do compile } */
+
+inline void
+foo (int x)
+{
+ double (*arr)[x];
+}
+
+void
+bar (void)
+{
+ foo (1);
+}