From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D89A0395B828; Thu, 23 Apr 2020 19:12:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D89A0395B828 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587669140; bh=ipQGJR79qhkfLQSW3TMR5psR0UNNL6bADbysA4tclRM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lGKDOPfwF3zV6T+/NLduZlplJ8ltdao0nSout7NWfqHz7hA9oSdddCUUBY3mvYBpY 6cvM3NIZ9Gj/XaPFHH1eVzuX17MOxvZ6DLezDUVBTr/ISO2a0VK39c3Tz8Wf4/M/M3 WiEZuV5qsDmFawcKvp0zG7cACj6xJa+S/r+FaFwE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/94724] [10 Regression] wrong code at -O0 on x86_64-linux-gnu since r10-7344-gca6c722561ce9b9d Date: Thu, 23 Apr 2020 19:12:20 +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: 10.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: P1 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.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: Thu, 23 Apr 2020 19:12:21 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94724 --- Comment #3 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:bca558de2a24b2a78c6a321d6cec384e07759d77 commit r10-7921-gbca558de2a24b2a78c6a321d6cec384e07759d77 Author: Jakub Jelinek Date: Thu Apr 23 21:11:36 2020 +0200 tree: Fix up get_narrower [PR94724] In the recent get_narrower change, I wanted it to be efficient and avoid recursion if there are many nested COMPOUND_EXPRs. That builds the COMPOUND_EXPR nest with the right arguments, but as build2_loc computes some flags like TREE_SIDE_EFFECTS, TREE_CONSTANT and TREE_READONLY, when it is called with something that will not be the argument in the end, those flags are computed incorrectly. So, this patch instead uses an auto_vec and builds them in the reverse order so when they are built, they are built with the correct operands. 2020-04-23 Jakub Jelinek PR middle-end/94724 * tree.c (get_narrower): Instead of creating COMPOUND_EXPRs temporarily with non-final second operand and updating it later, push COMPOUND_EXPRs into a vector and process it in reverse, creating COMPOUND_EXPRs with the final operands. * gcc.c-torture/execute/pr94724.c: New test.=