[Bug other/95971] [10 regression] Optimizer converts a false boolean value into a true boolean value
0xe2.0x9a.0x9b at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Jun 29 18:44:05 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95971
--- Comment #7 from Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0x9b at gmail dot com> ---
(In reply to Martin Liška from comment #6)
> All right, so it's caused by cdde1:
>
> Assume loop 1 to be finite: it has an exit and -ffinite-loops is on.
>
> -ffinite-loops
> Assume that a loop with an exit will eventually take the exit and
> not loop indefinitely. This allows the compiler to remove loops that
> otherwise have no side-effects, not considering eventual endless looping as
> such.
>
> This option is enabled by default at -O2 for C++ with -std=c++11
> or higher.
Thank you for the explanation.
Your mindset is forcing me to stop using g++ over time because of reliability
concerns during application development.
Sincerely
Jan
More information about the Gcc-bugs
mailing list