From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 812E93856261; Wed, 10 May 2023 16:41:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 812E93856261 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683736860; bh=GXZ+dE1WORtMzFwri8k/WMvH5G0LGC8EJKBN5wcbaNI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hiz80hErZ0trxsXHm22kejBGzqfZKaRs8+NZ1WQ9WW1dSBwQZCCaYUSUKmCzJVVyU 8V+bDKC1vp18FSO66B44MAS9u+sy3V904mdVCrCObZo2X9yXjnVIN5RtsBTQ67QVXX GoroCn24R+YyjukdTO2i0HLMM9gTOqYs0176wbAg= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109801] -Wmaybe-uninitialized warning with -O1 on move constructor Date: Wed, 10 May 2023 16:41:00 +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.1.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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=3D109801 --- Comment #1 from Andrew Pinski --- Note in GCC 13 and above we give an extra warning too: : In function 'int main()': :30:49: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 30 | table container(std::move(table())); | ^ :30:49: note: remove 'std::move' call=