Is this patch OK to merge to the 4.0 branch?
I think so.
Yes.
Note that this revision is the strictly smallest fix. I refactored it into a faster test that usually does not require checking all members of the congruence class. But i don't expect this to occur commonly enough to ever matter performance wise.
This commit depends on r297424, which we can't merge because it breaks the ABI.
Two options: 1.It's possible to rework the code to not depend on that if you like. It should just be de-constifying some tings 2. You can avoid breaking the ABI by just adding back the old versions of the count and lookup functions, no?
Is anyone interested in fixing up this patch to merge?
There's more you'd have to merge as i'm about to fix pr32838, a related issue. Unless someone has a strong urge to have it in 4.0, ...
Thanks for pinging and reminding me of this one, Tom! I'm making a call here and resolving it as WONTFIX. Backporting just this very issue isn't really helping as in the meanwhile we fixed a bunch of miscompiles/crashes/etc.. Backporting all of them seems unrealistic in the 4.0.1 timeframe.