From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 82ED4385C413; Fri, 30 Sep 2022 16:55:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 82ED4385C413 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664556907; bh=wYcUXYJ/w2FN1pDXk1wJOX9des1xWPrFJUOyQZb/Biw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=j/kUCw+jz/f89Tyzwn/wQxWKwcQBRxzvZ9zGr8QnS6ttUkt9vWc4BbRaERug2dZcL WW5w7TSOy5g+yN96oMOdRHat56KcVMWN+V6hqigFnVrn+KG5gKxUVD4X1+JgnchA0b 1siBEnKOaMYVTaxeHCn98fFUvABdtcAAPfNsbFp0= From: "dan at stahlke dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/105329] [12/13 Regression] Bogus restrict warning when assigning 1-char string literal to std::string since r12-3347-g8af8abfbbace49e6 Date: Fri, 30 Sep 2022 16:55:02 +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: 12.0 X-Bugzilla-Keywords: diagnostic, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: dan at stahlke 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=3D105329 Dan Stahlke changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dan at stahlke dot org --- Comment #24 from Dan Stahlke --- Here is another test case, broken on 12.2 with "-std=3Dc++20 -Wrestrict -O3= " but working on trunk and working on 12.2 with -O2 rather than -O3. #include #include // std::ignore int main() { std::string s =3D "b"; std::ignore =3D "a" + std::move(s); }=