This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/31724] [4.3 Regression] More "same canonical type node" fun



------- Comment #4 from pinskia at gcc dot gnu dot org  2007-04-29 16:56 -------
I have a fix:
Index: init.c
===================================================================
--- init.c      (revision 124182)
+++ init.c      (working copy)
@@ -1624,6 +1624,7 @@
   if (nelts)
     {
       tree index;
+      hashval_t hashcode = 0;

       outer_nelts = nelts;
       array_p = true;
@@ -1640,6 +1641,12 @@
          of the incomplete array type.  */
       full_type = build_distinct_type_copy (full_type);
       TYPE_DOMAIN (full_type) = index;
+
+      /* Make sure we have the canonical FULL_TYPE. */
+      hashcode = iterative_hash_object (TYPE_HASH (type), hashcode);
+      hashcode = iterative_hash_object (TYPE_HASH (TYPE_DOMAIN (full_type)),
+                                       hashcode);
+      full_type = type_hash_canon (hashcode, full_type);
     }
   else
     {


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-04-29 16:55:18         |2007-04-29 16:56:12
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31724


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]