This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix disable-checking bootstrap problem on ppc-darwin



If true, another solution is to ensure that for any commutative
operation that we're hashing, that we use a commutative hash.  So
instead of always

	for each operand (op) {
	  hash <<= n;
	  hash ^= munge(op);
	}

do

	if (commutative (operation)) {
	  hash <<= n;
	  hash ^= munge(operation);
	  for each operand (op) {
	    hash += munge(op);
	  }
	} else {
	  ...
	}

This works for the _hash function, but the _eq function still needs to somehow work out whether the two lists are really equivalent or just happen to have the same hash value.



Right, and I believe the whole problem in your case was that you had two things that hashed the same, but did not actually have the same vuse lists, right?




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]