aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-01-22 17:18:14 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2008-01-22 17:18:14 +0100
commit42a89d2d5484ad7d68071cc7c1cbc8c759ac783d (patch)
tree602f12254a8ed63d8e866b56a5c95b94d3673a61 /gcc/tree.c
parent29b0d1fd13249532adf239467d68bd4922e62d3c (diff)
downloadgcc-42a89d2d5484ad7d68071cc7c1cbc8c759ac783d.zip
gcc-42a89d2d5484ad7d68071cc7c1cbc8c759ac783d.tar.gz
gcc-42a89d2d5484ad7d68071cc7c1cbc8c759ac783d.tar.bz2
re PR c++/34917 (ICE with const vector)
PR c++/34917 * tree.c (build_type_attribute_qual_variant): Call build_qualified_type if attributes are equal, but quals are not. * g++.dg/ext/vector12.C: New test. From-SVN: r131726
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 4757cbc..b6b3eef 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -3735,6 +3735,8 @@ build_type_attribute_qual_variant (tree ttype, tree attribute, int quals)
ttype = build_qualified_type (ntype, quals);
}
+ else if (TYPE_QUALS (ttype) != quals)
+ ttype = build_qualified_type (ttype, quals);
return ttype;
}