From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C3F5E3851C21; Fri, 26 Jun 2020 10:38:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C3F5E3851C21 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1593167938; bh=BVlVB5mPkT+jilszSPBMgyNdP5+6hKcI47CcJOuOfNI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=d1lGD6JRoxIVLQu89L3Nt52aM93n5f1angg6s4tOdzk8aEamwgtbFeoYykOx91rJ5 Zvcx0A37bfZUYXbqttp8vCmogRLAsUAWBM0oN50Np0VeH+21bEdC93XxeB6ibR5QAF TiGJyOjN8exPVmP/TQ/r/90BqhDUbXsVqT2k+3QE= From: "markus at oberhumer dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/95903] gcc 10: wrong code with -fwrapv Date: Fri, 26 Jun 2020 10:38:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: markus at oberhumer dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 10:38:58 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95903 --- Comment #6 from Markus F.X.J. Oberhumer -= -- Thanks for the quick fix! And no need to be grumpy, I'm just trying to nail down those pesky edge cases... As for ILP32, here is another suspicious test case, now only using just a little bit more than 2 GiB of memory: https://gcc.godbolt.org/z/mRf2kd // arm64-linux-gcc -mabi=3Dilp32 -O2 -fwrapv -fwrapv-pointer char get_byte(const char* ptr, int off) { off +=3D 2147483647; return ptr[off]; }=