From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 44A26385609D; Sun, 12 Jun 2022 22:25:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 44A26385609D From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/105937] [12/13 Regression] maybe-uninitialized with std::optional Date: Sun, 12 Jun 2022 22:25:29 +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, needs-reduction 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: 12.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords target_milestone short_desc 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jun 2022 22:25:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105937 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |needs-reduction Target Milestone|--- |12.2 Summary|[12] Regression with |[12/13 Regression] |maybe-uninitialized |maybe-uninitialized with | |std::optional --- Comment #2 from Andrew Pinski --- # ttfRunIndex_64 =3D PHI # ttfRunIndex$8_65 =3D PHI ... : [/app/example.cpp:213:13] if (ttfRunIndex$8_65 !=3D 0) goto ; [33.00%] else goto ; [67.00%] ... [local count: 157594832]: [/app/example.cpp:216:62] len_15 =3D _20 - ttfRunIndex_64; ... # ttfRunIndex_6 =3D PHI # ttfRunIndex$8_8 =3D PHI <0(26), 0(48), [/app/example.cpp:227:29] 1(21), 1(49)> So if anything this is both a missed optimization and the maybe uninitializ= ed predicates is not doing its job correctly.=