[Bug c++/63140] wrong code generation probably due to optimization problem

gcc at boomerangsworld dot de gcc-bugzilla@gcc.gnu.org
Wed Sep 3 10:30:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63140

--- Comment #5 from Ralf Hoffmann <gcc at boomerangsworld dot de> ---
Thanks for the feedback, I am also suspecting I have some problem in my code
regarding undefined behavior.

What I do for testing is to compile my tool Worker
(http://www.boomerangsworld.de/cms/worker/index.html, version 3.5.0) with

make clean
LDFLAGS="-fsanitize=undefined" CPPFLAGS="-fsanitize=undefined" ./configure
make

and then start the program (src/worker), click on top left "A" button for
the about dialog and click on the down arrow to scroll down the option list.
It then either works, or the process hangs in the endless loop.

I tried to use "-fsanitize=undefined" and it actually makes a difference. There
is no compiler output pointing out some problem and also no runtime output when
reaching the test point mentioned above. But with this option, it behaves
normally and the endless loop does not occur.

When using the options -fno-strict-overflow or
-fno-aggressive-loop-optimizations the problem still occurs.

I would like to help bisecting the compiler if you could give me
a hint where to start. As far as I see, there is no git repo which
would make it easier.



More information about the Gcc-bugs mailing list