This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31724] [4.3 Regression] More "same canonical type node" fun
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Apr 2007 15:56:13 -0000
- Subject: [Bug c++/31724] [4.3 Regression] More "same canonical type node" fun
- References: <bug-31724-12387@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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