
________________________________________ From: Boost [boost-bounces@lists.boost.org] on behalf of Mathias Gaunard [mathias.gaunard@ens-lyon.org] Sent: 22 January 2015 15:59 To: boost@lists.boost.org Subject: Re: [boost] Debugging optimisation unstable code - Stack and other tools On 22/01/2015 15:35, Fletcher, John P wrote:
I am working to get the bugs out of Phoenix and have a situation where some tests are optimisation unstable - they run on Clang 3.5 with -O1 but not -O2 and on gcc 4.9.0 with -O0 but not -O1. The higher optimisation gives an erroneous return value.
I am looking for tools to work with this.
You can enable the sanitizers bundled with clang and gcc. You can also try valgrind.
Thank you. I have been trying the sanitizers (clang version) without success. None report anything and using -fsanitize=undefined caused the error to disappear! I want to try making finer grained optimization but have not succeeded yet. John