summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/tree.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ed3c7ff9031..f8a6875497c 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 5f46cbdbf9d..78ba4282b44 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),