From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BD7FF3858421; Thu, 29 Jun 2023 09:33:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD7FF3858421 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688031217; bh=OwyOKL7H5F8Ek9N48RURNI2DqeGRfanhquVDkN3ct0g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fkfTu8qKnrlE3h1AvJv5WzjNZyXirxjZLYcYuKvWh4HrFe5J9hWERA68SFve/lx4F AMj/Fnny+59mJB8pXXr9F6j8i31n2GWJ9RfRwvVUZ9d3xEF55pxLtgpisehv/uinXX lb8X17ByekskhZSrGvhuo0NFIZ4Qp811bLv/MUkA= From: "baiwfg2 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/110399] pointer substraction causes coredump with ftrapv on edge case Date: Thu, 29 Jun 2023 09:33:37 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: baiwfg2 at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: DUPLICATE X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110399 --- Comment #3 from Chan Lewis --- (In reply to Andrew Pinski from comment #2) > Dup of bug 13421. >=20 > *** This bug has been marked as a duplicate of bug 13421 *** I see. I wonder why gcc consider pointer signed and need to abort in this c= ase, whereas clang still works as expected. If we change pointer to unsigned in = our codebase, that will be lots of work.=