* [PATCH] Fixup LTO SCC hash comparison fn
@ 2011-05-17 16:46 Richard Guenther
0 siblings, 0 replies; only message in thread
From: Richard Guenther @ 2011-05-17 16:46 UTC (permalink / raw)
To: gcc-patches
Quite obvious if you look at it for the 100th time...
Richard.
2011-05-17 Richard Guenther <rguenther@suse.de>
* gimple.c (type_hash_pair_compare): Fix comparison.
Index: gcc/gimple.c
===================================================================
--- gcc/gimple.c (revision 173830)
+++ gcc/gimple.c (working copy)
@@ -4070,9 +4070,11 @@ type_hash_pair_compare (const void *p1_,
{
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-05-17 14:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-17 16:46 [PATCH] Fixup LTO SCC hash comparison fn Richard Guenther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).