From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4593738618F9; Sun, 29 Oct 2023 21:20:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4593738618F9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698614454; bh=aSzj4CFGu2SuWDiXyVqSGHnRGKfZUv5IZZzyS33xuMw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OLNpZNfTbqYOTtsXPIwnkVigbAmfpizRt8LLacnUbeIRsIakB/kbi+E02ugZ40t0F 3BXe75eRNM/QLNY0/JGtOt5ZqoYmMax7lMrOKmy1b02YOhi5J8RIJCAvoaJtvtQXfm PFqDUs0/t33s8eeYpmtHPuDfzpvOI4koeuO3ND00= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/112281] [12/13/14 Regression] wrong code at -O3 on x86_64-linux-gnu Date: Sun, 29 Oct 2023 21:20:54 +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: unknown X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.4 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112281 --- Comment #1 from Andrew Pinski --- -fno-tree-loop-distribution fixes the issue. Looks like loop distribution is pulling out the assignment of `b =3D d[c + = 1];` from the loop even though the loop does assignment to a field of that `d[c + 1].a =3D 0;`.=