From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 66D003858C3A; Sat, 12 Mar 2022 04:40:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 66D003858C3A From: "jason 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: Sat, 12 Mar 2022 04:40:38 +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: jason 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: 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: Sat, 12 Mar 2022 04:40:39 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102586 --- Comment #28 from Jason Merrill --- (In reply to Qing Zhao from comment #27) > Does this issue only exist with -flifetime-dse=3D2? > When -flifetime-dse=3D2, the call to __builtin_clear_padding should be > inserted AFTER the start point of the constructor of the object, otherwise > it=E2=80=99s dead and will be eliminated by DSE.=20 > And with -flifetime-dse=3D2, the padding initialization should be done by= C++ > FE instead of middle end. > Is this understanding correct? Yes, -flifetime-dse=3D2 conflicts with -ftrivial-auto-var-init in that both= are trying to define the initial state of the variable. Perhaps -ftrivial-auto-var-init should lower to -flifetime-dse=3D1. Or change build_clobber_this to do the specified initialization instead of a clobber, though that would mean doing the initialization for any object of = that type, not just automatics.=