User account creation filtered due to spam.
Created attachment 22686 [details]
Bash script to reproduce bug
The output of the attached script is expected to be "0" but is "1".
Tested on GCC 4.4.5, Linux x86_64, but I believe it occurs elsewhere too and in other versions.
At first I encountered the problem with -O2 but then narrowed it down to
-O -fstrict-overflow -foptimize-sibling-calls -ftree-vrp
as shown in the script. Adding
fixes the problem. Removing "inline" from the function fixes the problem.
You invoke undefined behavior by overflowing a signed integer.