]> gcc.gnu.org Git - gcc.git/commitdiff
tree.c (type_hash_lookup): Check for equal TYPE_ALIGN fields when comparing types.
authorAndrew Haley <aph@cygnus.com>
Fri, 10 Sep 1999 16:07:18 +0000 (16:07 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Fri, 10 Sep 1999 16:07:18 +0000 (16:07 +0000)
Fri Sep 10 16:48:26 1999  Andrew Haley  <aph@cygnus.com>

        * tree.c (type_hash_lookup): Check for equal TYPE_ALIGN fields
        when comparing types.

From-SVN: r29271

gcc/ChangeLog
gcc/tree.c

index 7161319bbac6177644223d0f767cbb64925336fc..f5d04131dc8fe9ae6d2e4db355675f38ed8669f4 100644 (file)
@@ -1,3 +1,8 @@
+Fri Sep 10 16:48:26 1999  Andrew Haley  <aph@cygnus.com>
+
+       * tree.c (type_hash_lookup): Check for equal TYPE_ALIGN fields
+       when comparing types.
+
 Wed Sep  8 16:12:04 1999  Andrew Haley  <aph@cygnus.com>
 
        * alias.c (rtx_equal_for_memref_p): Allow CONST_DOUBLEs to be used
index 2dc6361d0ac6c99d5c804ce39a58c9b547d713d9..b10ce01ccfdab7f86b6e0ecf147955c6ec01d3b4 100644 (file)
@@ -3672,12 +3672,18 @@ type_hash_lookup (hashcode, type)
      tree type;
 {
   register struct type_hash *h;
+
+  /* The TYPE_ALIGN field of a type is set by layout_type(), so we
+     must call that routine before comparing TYPE_ALIGNs. */
+  layout_type (type);
+
   for (h = type_hash_table[hashcode % TYPE_HASH_SIZE]; h; h = h->next)
     if (h->hashcode == hashcode
        && TREE_CODE (h->type) == TREE_CODE (type)
        && TREE_TYPE (h->type) == TREE_TYPE (type)
         && attribute_list_equal (TYPE_ATTRIBUTES (h->type),
                                   TYPE_ATTRIBUTES (type))
+       && TYPE_ALIGN (h->type) == TYPE_ALIGN (type)
        && (TYPE_MAX_VALUE (h->type) == TYPE_MAX_VALUE (type)
            || tree_int_cst_equal (TYPE_MAX_VALUE (h->type),
                                   TYPE_MAX_VALUE (type)))
This page took 0.074831 seconds and 5 git commands to generate.