gimple.c (type_hash_pair_compare): Fix comparison.

2011-05-17  Richard Guenther  <rguenther@suse.de>

	* gimple.c (type_hash_pair_compare): Fix comparison.

From-SVN: r173832
This commit is contained in:
Richard Guenther 2011-05-17 14:58:18 +00:00 committed by Richard Biener
parent cc0fd50a42
commit 5beaf6643b
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2011-05-17 Richard Guenther <rguenther@suse.de>
* gimple.c (type_hash_pair_compare): Fix comparison.
2011-05-17 Richard Guenther <rguenther@suse.de>
* gimple.c (iterative_hash_gimple_type): Simplify singleton

View File

@ -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.