From: Jakub Jelinek Date: Fri, 24 Aug 2007 17:06:59 +0000 (+0200) Subject: re PR debug/32610 (ICE in gen_tagged_type_instantiation_die, at dwarf2out.c:12762) X-Git-Tag: releases/gcc-4.2.2~125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4733a59e42dca02a2210fc14eb369fa83601a852;p=thirdparty%2Fgcc.git 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: r127776 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0d0ae1adb42b..eeb3d6d7bbac 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-08-24 Jakub Jelinek + + 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 * expr.c (get_inner_reference): Remove unused variable. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 30bb90f1b5b9..15b49a05b8aa 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a0b690e70178..f4ffedc4e423 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-08-24 Jakub Jelinek + + PR debug/32610 + * gcc.dg/debug/pr32610.c: New test. + 2007-08-22 Richard Guenther 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 index 000000000000..d1dae1d38aec --- /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); +}