diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-17 14:58:18 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-17 14:58:18 +0000 |
commit | e8dcede063cdfd7c55905c18c5e0860a511f8f51 (patch) | |
tree | 2c050a144e814ee3632aef14c7866e2b5d00a803 /gcc/gimple.c | |
parent | 9b2b372b3dc8ede3e6ffbc024da8ac8490cffe39 (diff) | |
download | gcc-e8dcede063cdfd7c55905c18c5e0860a511f8f51.tar.gz |
2011-05-17 Richard Guenther <rguenther@suse.de>
* gimple.c (type_hash_pair_compare): Fix comparison.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173832 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index 0c07ac24989..831ca31e0e5 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -4070,9 +4070,11 @@ type_hash_pair_compare (const void *p1_, const void *p2_) { const struct type_hash_pair *p1 = (const struct type_hash_pair *) p1_; const struct type_hash_pair *p2 = (const struct type_hash_pair *) p2_; - if (p1->hash == p2->hash) - return TYPE_UID (p1->type) - TYPE_UID (p2->type); - return p1->hash - p2->hash; + if (p1->hash < p2->hash) + return -1; + else if (p1->hash > p2->hash) + return 1; + return 0; } /* Returning a hash value for gimple type TYPE combined with VAL. |