From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 589F8385800F; Tue, 5 Oct 2021 08:36:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 589F8385800F From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/102285] New flag -ftrivial-auto-var-init=zero causes crash in pr82421.c Date: Tue, 05 Oct 2021 08:36:25 +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: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth 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: Tue, 05 Oct 2021 08:36:25 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102285 --- Comment #29 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:604459a09585314841cdce4698893c656481691b commit r12-4182-g604459a09585314841cdce4698893c656481691b Author: Richard Biener Date: Tue Oct 5 09:28:20 2021 +0200 More .DEFERRED_INIT expansion rework This avoids looking at the type size and instead uses the size as passed to .DEFERRED_INIT to determine the size of the non-MEM to be initialized. It also arranges for possibly poly-int inits to always use zero-initialization rather than not initializing and when we need to pun puns the LHS instead of the constant value. That correctly initializes the variable-size typed array in the testcase for PR102285 and the SVE vector in PR102587 where for the testcase I needed to add a SVE capable -march as to not ICE later. 2021-10-05 Richard Biener PR middle-end/102587 PR middle-end/102285 * internal-fn.c (expand_DEFERRED_INIT): Fall back to zero-initialization as last resort, use the constant size as given by the DEFERRED_INIT argument to build the initializer. * gcc.target/aarch64/sve/pr102587-1.c: Add -march=3Darmv8.3-a+s= ve. * gcc.target/aarch64/sve/pr102587-2.c: Likewise.=