diff mbox

Fix PR54704

Message ID alpine.LNX.2.00.1209251706430.4063@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Sept. 25, 2012, 3:07 p.m. UTC
I am testing the following patch to fix a typo(?) in the hash
function for location ad-hoc data.  The current hash function
causes 1000 collisions for each search when building tramp3d.

Bootstrap and regtest running on x86_64-unknown-linux-gnu.

Richard.

2012-09-25  Richard Guenther  <rguenther@suse.de>

	PR middle-end/54704
	* line-map.c (location_adhoc_data_hash): Fix.
diff mbox

Patch

Index: libcpp/line-map.c
===================================================================
--- libcpp/line-map.c	(revision 191706)
+++ libcpp/line-map.c	(working copy)
@@ -58,7 +58,7 @@  location_adhoc_data_hash (const void *l)
 {
   const struct location_adhoc_data *lb =
       (const struct location_adhoc_data *) l;
-  return (hashval_t) lb->locus + (size_t) &lb->data;
+  return (hashval_t) lb->locus + (size_t) lb->data;
 }
 
 /* Compare function for location_adhoc_data hashtable.  */