From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DC3303858428; Wed, 18 Jan 2023 18:44:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DC3303858428 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674067457; bh=dxBqkAc1QLQ9yrfPfSwUQeitjneqwVBR/INMhMyFPMo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dJEcId9BMXoqowM9Ohs4QYvI5auBmAlukmBgtxaP54xkf768YNbaLUyhNT1C2pTNh ujq01QLrUFbRG7j+iKCgIxdbkGPFxF5yA5zHGNGFqYZJ8C9JcA01fe0vJKaZOppX/L YIA6c3NOsFxdQdmo7tQPmh4tYgTmmp77Attbghes= From: "gavin at yzena dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/108448] GCC Elides Assignment to Pointer and memcpy Date: Wed, 18 Jan 2023 18:44:17 +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: 11.3.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gavin at yzena dot com X-Bugzilla-Status: WAITING 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=3D108448 --- Comment #5 from Gavin Howard --- As mentioned, it works at -O0, and UBSan reports nothing until the segfault. ASan also reports nothing. Valgrind also reports nothing. They all report nothing at -O0 and -O2. I keep my code clean of such things during development, which is one reason= I am so confused. I'll get the amalgamation to you, but it will take me some hours to do so.=