From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F1FFE3858CDB; Tue, 2 Apr 2024 14:49:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F1FFE3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712069341; bh=1zZY5A4hk9SMgnxW7ZCNG7bDGEI8ykeMJ/bgoBfLwxk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=aRsMcG1b7hHl4f6IaxgmLvG7rUvbrTnnvTyZAc0STynGh2aar9ee+n0ZkQf5xzVcD C/KtyWqT8HvG1Rm3V9BG8yH7YD+1sVzS5KYl+1CtSaOCeA92+Bzayg3M8wMwib6tCB 2QimUHRmfnvYwyiv0ybeYG/RgfX00JqitekwJGs0= From: "roger at nextmovesoftware dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/114552] [13/14 Regression] wrong code at -O1 and above on x86_64-linux-gnu since r13-990 Date: Tue, 02 Apr 2024 14:49:01 +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: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: roger at nextmovesoftware dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D114552 Roger Sayle changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |roger at nextmovesoftware = dot com --- Comment #6 from Roger Sayle --- Many thanks Jakub, and my apologies for the breakage/inconvenience. It loo= ks like sizeof(k) is 10 bytes, and sizeof(k.b) is 6 bytes, and somehow this co= de is getting the constructor for "k" and not for just "k.b". This is, of cou= rse, fine for memcpy as it can move the just the pieces it wants. I completely agree that the safe fix is to check that the sizes match; I don't think I e= ver considered that they might not be identical when I wrote this code, or assu= med that partial would be non-zero for this case].=