From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 06C77385841C; Mon, 28 Feb 2022 15:58:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 06C77385841C From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/104550] bogus warning from -Wuninitialized + -ftrivial-auto-var-init=pattern Date: Mon, 28 Feb 2022 15:58:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: qinzhao 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 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: Mon, 28 Feb 2022 15:58:59 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104550 --- Comment #21 from CVS Commits --- The master branch has been updated by Qing Zhao : https://gcc.gnu.org/g:3f3246eb16f554c70c5ce87ad2c785f83adb4625 commit r12-7411-g3f3246eb16f554c70c5ce87ad2c785f83adb4625 Author: Qing Zhao Date: Mon Feb 28 15:58:43 2022 +0000 Suppress uninitialized warnings for new created uses from __builtin_clear_padding folding [PR104550] __builtin_clear_padding(&object) will clear all the padding bits of the object. actually, it doesn't involve any use of an user variable. Therefore, us= ers do not expect any uninitialized warning from it. It's reasonable to suppre= ss uninitialized warnings for all new created uses from __builtin_clear_padding folding. PR middle-end/104550 gcc/ChangeLog: * gimple-fold.cc (clear_padding_flush): Suppress warnings for n= ew created uses. gcc/testsuite/ChangeLog: * gcc.dg/auto-init-pr104550-1.c: New test. * gcc.dg/auto-init-pr104550-2.c: New test. * gcc.dg/auto-init-pr104550-3.c: New test.=