re PR c++/33185 (ICE: canonical types differ for identical types T [] and T [])
authorDouglas Gregor <doug.gregor@gmail.com>
Mon, 24 Sep 2007 13:46:40 +0000 (13:46 +0000)
committerDoug Gregor <dgregor@gcc.gnu.org>
Mon, 24 Sep 2007 13:46:40 +0000 (13:46 +0000)
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

gcc/cp/ChangeLog
gcc/cp/tree.c

index ed3c7ff9031440460a4c25a2dfee7de403dac896..f8a6875497c091d6e60e65f7f718a63d7590d59e 100644 (file)
@@ -1,3 +1,9 @@
+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
index 5f46cbdbf9d9847514e32d448f03e5db99043b3a..78ba4282b4471b66a376fa5568c4939783a92a4e 100644 (file)
@@ -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),