diff options
author | Douglas Gregor <doug.gregor@gmail.com> | 2007-09-24 13:46:40 +0000 |
---|---|---|
committer | Doug Gregor <dgregor@gcc.gnu.org> | 2007-09-24 13:46:40 +0000 |
commit | c946ce8bb9716d31286140dad73e0d3b9e48c36b (patch) | |
tree | 5a43d10dcb808457af757794adce2f2e319632ae /gcc | |
parent | ffda6fc98d95327f863b1ec24255fda16ee8e43d (diff) | |
download | gcc-c946ce8bb9716d31286140dad73e0d3b9e48c36b.zip gcc-c946ce8bb9716d31286140dad73e0d3b9e48c36b.tar.gz gcc-c946ce8bb9716d31286140dad73e0d3b9e48c36b.tar.bz2 |
re PR c++/33185 (ICE: canonical types differ for identical types T [] and T [])
2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33185
* tree.c (cp_build_qualified_type_real): Build a canonical
ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
From-SVN: r128717
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/tree.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ed3c7ff..f8a6875 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,11 @@ 2007-09-24 Douglas Gregor <doug.gregor@gmail.com> + PR c++/33185 + * tree.c (cp_build_qualified_type_real): Build a canonical + ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type. + +2007-09-24 Douglas Gregor <doug.gregor@gmail.com> + PR c++/33112 PR c++/33185 * tree.c (cplus_array_compare): Compare pointers, not types. diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 5f46cbd..78ba4282 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -738,7 +738,8 @@ cp_build_qualified_type_real (tree type, SET_TYPE_STRUCTURAL_EQUALITY (t); else if (TYPE_CANONICAL (element_type) != element_type || (index_type - && TYPE_CANONICAL (index_type) != index_type)) + && TYPE_CANONICAL (index_type) != index_type) + || TYPE_CANONICAL (type) != type) TYPE_CANONICAL (t) = build_cplus_array_type (TYPE_CANONICAL (element_type), |