From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0A5E2385841D; Fri, 17 Sep 2021 04:00:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A5E2385841D From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/102381] unexpected -Wmaybe-uninitialized Date: Fri, 17 Sep 2021 04:00: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: 7.5.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: everconfirmed bug_status cf_reconfirmed_on 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: Fri, 17 Sep 2021 04:00:30 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102381 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2021-09-17 --- Comment #1 from Andrew Pinski --- Confirmed. .... [AFTER NORMALIZATION -- [DEF]: ipp_28 =3D PHI is guarded by : i2.2_26 > 0 (.AND.) i1_10(D) !=3D 0 .... [AFTER NORMALIZATION -- [USE]: ipp_27 =3D PHI is guarded by : i1_10(D) !=3D 0 (.AND.) (.NOT.) i4_17 < prephitmp_25 (.AND.) _2 =3D=3D 0 (.OR.) i1_10(D) !=3D 0 (.AND.) (.NOT.) i4_17 < prephitmp_25 (.AND.) i3.0_1 & 1 ... _2 =3D i3.0_1 & 1; So there is a missing simplification It should have been: i1_10(D) !=3D 0 (.AND.) (.NOT.) i4_17 < prephitmp_25 prephitmp_25 is defined as: # prephitmp_25 =3D PHI So i2.2_26 (as i2.2_21 is the one on the branch which would have been uninitialized). So we are down to: i1_10(D) !=3D 0 (.AND.) (.NOT.) i4_17 < i2.2_26 i4_17 is the loop IV so it should be discarded.=