From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 67C593858C60; Fri, 21 Jan 2022 13:41:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 67C593858C60 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/94905] [10/11 Regression] Bogus warning -Werror=maybe-uninitialized Date: Fri, 21 Jan 2022 13:41:52 +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: 9.3.0 X-Bugzilla-Keywords: diagnostic, needs-bisection 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: 10.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc cf_known_to_fail cf_known_to_work keywords cf_reconfirmed_on 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: Fri, 21 Jan 2022 13:41:52 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94905 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |msebor at gcc dot gnu.org Known to fail| |11.2.1 Known to work| |12.0 Keywords| |needs-bisection Last reconfirmed|2020-09-03 00:00:00 |2022-1-21 Summary|[10/11/12 Regression] Bogus |[10/11 Regression] Bogus |warning |warning |-Werror=3Dmaybe-uninitialized |-Werror=3Dmaybe-uninitia= lized --- Comment #12 from Richard Biener --- The diagnostic is gone with GCC 12 as we there pattern-recognize a memcpy: [local count: 119292720]: insert_axis_len.0_1 =3D insert_axis_len; ret =3D{v} {CLOBBER}; ret.rho[0] =3D insert_axis_len.0_1; __builtin_memcpy (_3(D), &ret, 32); ret =3D{v} {CLOBBER}; return _3(D); and the partial uninitialized read from it is not what the uninit pass can diagnose (it's memory walking stops at the first may-def, it does not prune must-def ranges). But even with -fno-tree-loop-distribute-patterns -fno-tree-vectorize where we get similar IL as with GCC 11 we do not warn s= o I wonder what fixed it on trunk (when you add those options).=