aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2008-01-30 16:05:19 -0800
committerRichard Henderson <rth@gcc.gnu.org>2008-01-30 16:05:19 -0800
commit2ae7b972a6fdb321691483655f6de98b02e83a46 (patch)
treeec13d7747bcf59be736713b07dd8e028c71f37f1 /gcc/tree.c
parent996b13caed7ccde5633be15a4335e8521b914721 (diff)
downloadgcc-2ae7b972a6fdb321691483655f6de98b02e83a46.zip
gcc-2ae7b972a6fdb321691483655f6de98b02e83a46.tar.gz
gcc-2ae7b972a6fdb321691483655f6de98b02e83a46.tar.bz2
re PR c/34993 (ICE with attribute for array with unknown bound)
PR c/34993 * tree.c (build_type_attribute_qual_variant): Skip TYPE_DOMAIN for unbounded arrays. From-SVN: r131970
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index f61e24b..043968c 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -3701,8 +3701,9 @@ build_type_attribute_qual_variant (tree ttype, tree attribute, int quals)
hashcode = type_hash_list (TYPE_ARG_TYPES (ntype), hashcode);
break;
case ARRAY_TYPE:
- hashcode = iterative_hash_object (TYPE_HASH (TYPE_DOMAIN (ntype)),
- hashcode);
+ if (TYPE_DOMAIN (ntype))
+ hashcode = iterative_hash_object (TYPE_HASH (TYPE_DOMAIN (ntype)),
+ hashcode);
break;
case INTEGER_TYPE:
hashcode = iterative_hash_object