This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/83703] Loop termination condition ignored in -O3, works in -O2 or with smaller values
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 06 Jan 2018 18:21:26 +0000
- Subject: [Bug c/83703] Loop termination condition ignored in -O3, works in -O2 or with smaller values
- Auto-submitted: auto-generated
- References: <bug-83703-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83703
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The compiler optimizes with the assumption that undefined behavior doesn't
happen (i.e. it compiles valid programs), so if you have UB in your code, all
bets are off, it can do anything.