diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-01-22 17:18:14 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2008-01-22 17:18:14 +0100 |
commit | 42a89d2d5484ad7d68071cc7c1cbc8c759ac783d (patch) | |
tree | 602f12254a8ed63d8e866b56a5c95b94d3673a61 /gcc | |
parent | 29b0d1fd13249532adf239467d68bd4922e62d3c (diff) | |
download | gcc-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')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ext/vector12.C | 4 | ||||
-rw-r--r-- | gcc/tree.c | 2 |
4 files changed, 17 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bc76be7..a720103 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-01-22 Jakub Jelinek <jakub@redhat.com> + + PR c++/34917 + * tree.c (build_type_attribute_qual_variant): Call + build_qualified_type if attributes are equal, but quals are not. + 2008-01-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR 32102 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9a6eb68..7f0c716 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-01-22 Jakub Jelinek <jakub@redhat.com> + + PR c++/34917 + * g++.dg/ext/vector12.C: New test. + 2008-01-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR 32102 diff --git a/gcc/testsuite/g++.dg/ext/vector12.C b/gcc/testsuite/g++.dg/ext/vector12.C new file mode 100644 index 0000000..e0b6d2b --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/vector12.C @@ -0,0 +1,4 @@ +// PR c++/34917 +// { dg-do compile } + +const int i __attribute ((vector_size (8))) = {}; @@ -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; } |