This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/84816] [7.2.0/8.0.1 x86_64] Incorrect code generation if signed overflow
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 11 Mar 2018 02:32:59 +0000
- Subject: [Bug c++/84816] [7.2.0/8.0.1 x86_64] Incorrect code generation if signed overflow
- Auto-submitted: auto-generated
- References: <bug-84816-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84816
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Dmitry Lesnikov from comment #4)
> (In reply to Andrew Pinski from comment #1)
> > signed overflow is undefined behavior at runtime.
>
> for(int i=0; i<10; i++)
>
> this loop is correct.
But there is an overflow with the variable a when i is 6.