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: "ebotcazou 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 18:05:55 +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
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu.org
--- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Yes, but code generation incorrect. It's not runtime yet.
The criterion is as follows: does the code invoke undefined behavior when
executed in the abstract machine specified by the C standard? If so, then the
compiler is allowed to generate object code that does anything, including
playing some music or erasing the hard drive; here it generates an infinite
loop and that's OK.