https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116945
--- Comment #4 from Mark Wielaard <mark at gcc dot gnu.org> --- Also does running valgrind memcheck with --expensive-definedness-checks=yes help? --expensive-definedness-checks=<no|auto|yes> [default: auto] Controls whether Memcheck should employ more precise but also more expensive (time consuming) instrumentation when checking the definedness of certain values. In particular, this affects the instrumentation of integer adds, subtracts and equality comparisons. Selecting --expensive-definedness-checks=yes causes Memcheck to use the most accurate analysis possible. This minimises false error rates but can cause up to 30% performance degradation.