From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4942C3858D1E; Fri, 11 Feb 2022 17:36:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4942C3858D1E From: "qinzhao at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/102586] [12 Regression] ICE in clear_padding_type, at gimple-fold.c:4798 since r12-3433-ga25e0b5e6ac8a77a Date: Fri, 11 Feb 2022 17:36:35 +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.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: qinzhao at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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, 11 Feb 2022 17:36:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102586 qinzhao at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |qinzhao at gcc dot gnu.org --- Comment #25 from qinzhao at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #24) > I bet with the default -flifetime-dse=3D2 we would then have a > var =3D {}; > var =3D{v} {CLOBBER}; // Start of ctor clobber > var.whatever =3D ...; // Ctor content > and the zero initialization would be optimized away then. > I guess ideal would be to emit such zero initialization in the complete > object ctors right after the -flifetime-dse=3D2 beginning clobber and ide= ally > one that clearly says to the gimplifier and rest of middle-end that it mu= st > initialize even padding bits. > Because right now gimplification of var =3D {} will often happily lower t= hat to > var.a =3D 0; var.b =3D 0; var.c =3D 0; > even when there are padding bits, oh right, I recall that this was the reason why adding "var =3D {}" to init= ialize the whole structure didn't work well for initialize all paddings. therefore= we have to explicitly call __builtin_clear_padding for clear all paddings.=