From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CDBCF3857438; Mon, 13 Feb 2023 11:32:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CDBCF3857438 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676287975; bh=ujEsx7aGwh+l1Zzj+oag5CTV94b5kNE9YyAdsWODosY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BCY1TdfVURxuQXMiGqzbub6jua4xGzPj+I3Lc2t8anvSCzKtXKF62dQBO1w0F8tTv QdIFZzJh45nfMrKC0PBbqEZsF8KfGAPLbez4ACODVl3RHW4+jWH6n8ds/p33dU6ioK +OHaO63aAORyBvNg4L7XzUgqdfMYVOVyU9LFCTLQ= From: "jg at jguk dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/105651] [12 Regression] bogus "may overlap" memcpy warning with std::string and operator+ at -O3 Date: Mon, 13 Feb 2023 11:32:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: jg at jguk dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.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=3D105651 Jonny Grant changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jg at jguk dot org --- Comment #24 from Jonny Grant --- Hi, Glad it is fixed in trunk. I saw this fail in 12.2 - test case below. #include typedef struct a_bc { std::string a; std::string b; } a_t; void f() { a_t c; c.a =3D " sdfsdf fsdfsdf fdfsfdsdf "; // seems to need this long stri= ng to reproduce, down to 8 bytes it didn't c.b =3D "E"; }=