From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EA71438708AC; Fri, 10 Jul 2020 10:38:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EA71438708AC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1594377506; bh=LAQTF/eVnq3YrvTCpiCQR0x0jitUebTza0IaBI02Bus=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ebfof2LtCxyIT54lOsinhoby3h4LFGLuUXmSP8K4EmbXmEVWegXACOZ7MIUZORdKl Z6lUk8bxJK34EZVWkg3XgQan2ozVKb5Hhq2njgya7ZAsIaE7HKXtkvg+0lPOhPbOov AUwJbI2iTWmn9rniI+UzGjOeTuUU+cQeKU70Ne7A= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/96133] [10 Regression] x86-64 gcc 10.1 using -O3 leads to wrong calculation since r10-1882-g831e688af50c5f77 Date: Fri, 10 Jul 2020 10:38:26 +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 10:38:27 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96133 --- Comment #10 from CVS Commits --- The releases/gcc-10 branch has been updated by Richard Biener : https://gcc.gnu.org/g:8614106f121db118f9db260b9949883485d0bbf6 commit r10-8455-g8614106f121db118f9db260b9949883485d0bbf6 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. (cherry picked from commit 6e41c27bf549d957eb399d39d7d0c213f8733351)=