]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR debug/32610 (ICE in gen_tagged_type_instantiation_die, at dwarf2out.c:12762)
authorJakub Jelinek <jakub@redhat.com>
Fri, 24 Aug 2007 17:06:59 +0000 (19:06 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 24 Aug 2007 17:06:59 +0000 (19:06 +0200)
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: r127776

gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/debug/pr32610.c [new file with mode: 0644]

index 0d0ae1adb42b49220a55715efe7613be03241fa5..eeb3d6d7bbaccdc5ad08555c8de1a612f055de6c 100644 (file)
@@ -1,3 +1,9 @@
+2007-08-24  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-24  Richard Guenther  <rguenther@suse.de>
 
        * expr.c (get_inner_reference): Remove unused variable.
index 30bb90f1b5b9d9d2b4b80a6e11d813197321a1e2..15b49a05b8aa9a6dedd1420faa63472a224181ba 100644 (file)
@@ -13197,7 +13197,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;
index a0b690e7017874f1b9dcbd472922d37326390e18..f4ffedc4e4230855df8c5da09f8f015bf223e34d 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-24  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/32610
+       * gcc.dg/debug/pr32610.c: New test.
+
 2007-08-22  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/33142
diff --git a/gcc/testsuite/gcc.dg/debug/pr32610.c b/gcc/testsuite/gcc.dg/debug/pr32610.c
new file mode 100644 (file)
index 0000000..d1dae1d
--- /dev/null
@@ -0,0 +1,14 @@
+/* PR debug/32610 */
+/* { dg-do compile } */
+
+inline void
+foo (int x)
+{
+  double (*arr)[x];
+}
+
+void
+bar (void)
+{
+  foo (1);
+}