aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-09-20 23:27:39 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2007-09-20 23:27:39 +0200
commitcc459ab40ad75779ba111199bd75437399251cc3 (patch)
treeaa728aafbbc6b2e5ac493d4b21912cb46a44cf1f /gcc/dwarf2out.c
parent4745e4eb75aed535cc05f3393dd1209ffd8bac09 (diff)
downloadgcc-cc459ab40ad75779ba111199bd75437399251cc3.zip
gcc-cc459ab40ad75779ba111199bd75437399251cc3.tar.gz
gcc-cc459ab40ad75779ba111199bd75437399251cc3.tar.bz2
re PR debug/33316 (ICE on valid variable-length automatic array in const struct)
PR debug/33316 * dwarf2out.c (modified_type_die): Handle TYPE_DECL with NULL DECL_NAME. * dbxout.c (dbxout_type): Likewise. * gcc.dg/debug/pr33316.c: New test. From-SVN: r128631
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 527de82..3164d70 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -8724,7 +8724,8 @@ modified_type_die (tree type, int is_const_type, int is_volatile_type,
don't output a DW_TAG_typedef, since there isn't one in the
user's program; just attach a DW_AT_name to the type. */
if (name
- && (TREE_CODE (name) != TYPE_DECL || TREE_TYPE (name) == qualified_type))
+ && (TREE_CODE (name) != TYPE_DECL
+ || (TREE_TYPE (name) == qualified_type && DECL_NAME (name))))
{
if (TREE_CODE (name) == TYPE_DECL)
/* Could just call add_name_and_src_coords_attributes here,