From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E1967392AC0E; Thu, 15 Sep 2022 22:13:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E1967392AC0E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663280007; bh=1uzHvQ3faENumrYySwgrYUnxRFWFfboY4uaAD0tA00A=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NDo/tOina0LmnlvqLY4qrgVKVk8DPfZO0hS4xu8cNNYnAC+iy0/PvxUi19Q8dmSLo xshMJm5TjNTioj4zVuW8fDyOnJvnjPljySD3Jg+TyoGTi4VE+dq8yrsLLuOUtTytEV d3tiD177nYfG4jM0c/2mTuCZFEnwjqt2k335JtNs= From: "jan.zizka at nokia dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106922] [12 Regression] Bogus uninitialized warning on boost::optional<>>, missed FRE Date: Thu, 15 Sep 2022 22:13:27 +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.2.1 X-Bugzilla-Keywords: diagnostic, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: jan.zizka at nokia dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created 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=3D106922 --- Comment #10 from Jan =C5=BDi=C5=BEka --- Created attachment 53581 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53581&action=3Dedit Second reproducer failing with 5edf02ed2b6de024f83a023d046a6a18f645bc83 I have cherry-picked the fix on top of gcc 12 and I confirm that my original reproducer passes. But our production code still fails. I have created new reproducer, the change is that the optional is inside a struct and seems th= ere need to be two elements. With first reproducer I have eliminated this additional struct as that was also failing. Please try with: g++ -Werror -std=3Dc++20 -O2 -Wall -o reproduce1.o -c reproduce1.cpp=