From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9B8AA3858C20; Tue, 11 Oct 2022 10:22:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B8AA3858C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665483746; bh=8yrcqZaGUMrYaG94LwuQk9C4/6xV7MAWg2S5Brhc/kI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Xl6NvV3j/EUNQasAMFAVGfPNDORBXKvA/ak1zSSvk2xQsGLXEwTs841XCyVbpM1Vz QPc9G5miOp+3yp7pqq/NQiTzSqD+MCouuL2H7RgYKGMW7KeZcU9nintHfBL/BwX0Si sq+h9MHUz2KcNLI1RKLGFjrI0X2lrzsHXqCAfu2U= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107206] Bogus -Wuninitialized in std::optional Date: Tue, 11 Oct 2022 10:22:19 +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.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW 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=3D107206 --- Comment #4 from Richard Biener --- Btw, in other places I saw it's very much wanted to scalarize std::optional because that's often the best way to figure whether it's engaged or not and optimize dead code based on that. So not scalarizing probably isn't the be= st answer, still it would be nice to understand why SRA picks 'int' here even though there's no access of that.=