diff options
author | Andrew Haley <aph@cygnus.com> | 1999-09-10 16:07:18 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 1999-09-10 16:07:18 +0000 |
commit | da48638eff3749271bc9b30e1e9fc70c2ed952ca (patch) | |
tree | b7e1bdcd9b38a8dee973d017290ccf541f756f77 /gcc/tree.c | |
parent | 69ba6af33edee3f85b3e10b5838d7af24bf8dd9a (diff) | |
download | gcc-da48638eff3749271bc9b30e1e9fc70c2ed952ca.zip gcc-da48638eff3749271bc9b30e1e9fc70c2ed952ca.tar.gz gcc-da48638eff3749271bc9b30e1e9fc70c2ed952ca.tar.bz2 |
tree.c (type_hash_lookup): Check for equal TYPE_ALIGN fields when comparing types.
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
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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))) |