From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ECF4C38708F9; Fri, 10 Jul 2020 08:53:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ECF4C38708F9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1594371187; bh=KTnUjoRVq329+Qsulw1I7AUfVajkd8JISecIZVMTuDg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZQIZo2AT5sjERJV0kNeWCxUqkLtzxJoTeGYLIhz2S5rpUaHNZ895u45DIeeWELXoc Gki4Mv2sbmAfzT3pmT74RbpdErMzHxsRtrsxE4PuKvnBg+o5XaYgpZMOmtkywYDwkX RDZp+eFpt8Wb+q5+UrSY3KDTC6aCX6je8XdH9TWw= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/96133] [10/11 Regression] x86-64 gcc 10.1 using -O3 leads to wrong calculation since r10-1882-g831e688af50c5f77 Date: Fri, 10 Jul 2020 08:53:07 +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: 10.1.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.2 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: Fri, 10 Jul 2020 08:53:08 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96133 --- Comment #9 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:6e41c27bf549d957eb399d39d7d0c213f8733351 commit r11-1981-g6e41c27bf549d957eb399d39d7d0c213f8733351 Author: Richard Biener Date: Thu Jul 9 16:03:45 2020 +0200 fix constant folding from array CTORs This fixes the case where we try to fold a read from an array initalizer and happen to cross the boundary of multiple CTORs which isn't really supported. For the interesting cases like the testcase we actually handle the folding by encoding the whole initializer. 2020-07-10 Richard Biener PR tree-optimization/96133 * gimple-fold.c (fold_array_ctor_reference): Do not recurse to folding a CTOR that does not fully cover the asked for object. * gcc.dg/torture/pr96133.c: New testcase.=