From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0C0AA3858034; Thu, 23 Nov 2023 19:04:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C0AA3858034 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700766244; bh=yIn9zVkBQfvHD+blPDcH7oaUMo+rfy8aZ8XbU8TClow=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DRTz0A/o5etKb+Jo7Il5ylNYu5s0/NdmFSOkPHYxM915RlFoGL7m/8JFPY7w2pyoX 1t9S5qZMYly5OwkpbT3bKsKXNAhI6FrPatM+hBe12V6D9tvhu0WTdGOKgMZbPvY6Wr vNJsIBofLeeG9+cnTRecYtClf23WulMU3dbjFSD8= From: "post+gcc at ralfj dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/32667] block copy with exact overlap is expanded as memcpy Date: Thu, 23 Nov 2023 19:04:02 +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: 4.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: post+gcc at ralfj dot de X-Bugzilla-Status: NEW X-Bugzilla-Resolution: 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=3D32667 --- Comment #43 from post+gcc at ralfj dot de --- That is not my reading of the standard, but absent a proper (formal, mathematical) spec I guess it is hard to tell. With your reading, "if ((uintptr_t)src =3D=3D 0x400400)" is UB, since chang= ing the "src" argument to a different copy located at that address would change the execution. I strongly doubt that is the intent of the standard.=