Hi Markus, I feel deeply embarrassed now ... the sanitizer indeed found a spot where I relied on (undefined) semantics of signed integer overflow. Changing the offending "int" to "unsigned" fixed the problem.
Thanks a lot for the tip - I will definitely use the sanitizers more often in the future! Sorry for the noise, Martin On 11/17/16 10:53, Markus Trippelsdorf wrote: > On 2016.11.17 at 10:49 +0100, Martin Reinecke wrote: >> Hi, >> >> At some point in May 2016 there was a patch to the gcc trunk which >> caused one of my numerical codes to give incorrect results when compiled >> with this gcc version. This may of course be caused by some undefined >> behavior I'm unknowingly invoking in the code, or it may be a code >> generation bug in gcc. I tried to isolate the exact gcc commit that >> caused the change, but I got stuck... > > You should check this first by compiling with -fsanitize=undefined and > fixing all issues that may pop up. >