From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0D206385841B; Thu, 17 Feb 2022 07:54:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D206385841B From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/104550] bogus warning from -Wuninitialized + -ftrivial-auto-var-init=pattern Date: Thu, 17 Feb 2022 07:54:55 +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: rguenther at suse dot de 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: Thu, 17 Feb 2022 07:54:56 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104550 --- Comment #12 from rguenther at suse dot de --- On Wed, 16 Feb 2022, qinzhao at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104550 >=20 > --- Comment #7 from qinzhao at gcc dot gnu.org --- > (In reply to rguenther@suse.de from comment #6) > > > --- Comment #4 from Andrew Pinski --- > > > Maybe __builtin_clear_padding lowering should mark the load "MEM[(str= uct > > > vx_audio_level *)&info]" as not needing a warning. > >=20 > > Maybe padding clearing shouldn=E2=80=99t be exposed early but handled by > > .DEFFEREd_INIT expansion? > >=20 >=20 > If padding clearing is exposed too late till RTL expansion, some tree > optimization will not be able to be applied on the expanded stores?=20 Doesn't the same argument apply to .DEFERRED_INIT itself? Dependent on the .DEFERRED_INIT expansion strathegy the padding clearing might be unneccessary (for example when using memset())? > the approach to mark the load "MEM" as not needing a warning might be bet= ter? It's probably a good thing anyway, the 'R' in the RMW cycle isn't really a use.=