diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-09-20 23:27:39 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2007-09-20 23:27:39 +0200 |
commit | cc459ab40ad75779ba111199bd75437399251cc3 (patch) | |
tree | aa728aafbbc6b2e5ac493d4b21912cb46a44cf1f /gcc/dbxout.c | |
parent | 4745e4eb75aed535cc05f3393dd1209ffd8bac09 (diff) | |
download | gcc-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/dbxout.c')
-rw-r--r-- | gcc/dbxout.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 2494eda..ad1b3c7 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -2029,7 +2029,11 @@ dbxout_type (tree type, int full) another type's definition; instead, output an xref and let the definition come when the name is defined. */ stabstr_S ((TREE_CODE (type) == RECORD_TYPE) ? "xs" : "xu"); - if (TYPE_NAME (type) != 0) + if (TYPE_NAME (type) != 0 + /* The C frontend creates for anonymous variable length + records/unions TYPE_NAME with DECL_NAME NULL. */ + && (TREE_CODE (TYPE_NAME (type)) != TYPE_DECL + || DECL_NAME (TYPE_NAME (type)))) dbxout_type_name (type); else { |