From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B125E386F478; Thu, 5 Nov 2020 16:16:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B125E386F478 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/97721] [11 Regression] ICE in verify_range, at value-range.cc:361 Date: Thu, 05 Nov 2020 16:16:37 +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: 11.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: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.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, 05 Nov 2020 16:16:37 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97721 --- Comment #11 from CVS Commits --- The master branch has been updated by Aldy Hernandez : https://gcc.gnu.org/g:4ef0f1e90f1795b1f2d5bba05ed299e8c7635fd4 commit r11-4743-g4ef0f1e90f1795b1f2d5bba05ed299e8c7635fd4 Author: Aldy Hernandez Date: Thu Nov 5 12:40:51 2020 +0100 Drop overflow from constants while building ranges in ranger. Sometimes the overflow flag will leak into the IL. Drop it while creating ranges. There are various places we could plug this. This patch just plugs thi= ngs at get_tree_range which is the entry point for ranges from tree expressions. It fixes the PR, and probably fixes the ranger entirely, but we may need to revisit this. For example, I looked to see if there were other places that created ranges with TREE_OVERFLOW set, and there are various. For example, the following code pattern appears multiple times in vr-values.c: else if (is_gimple_min_invariant (op0)) vr0.set (op0); This can pick up TREE_OVERFLOW from the IL if present. However, the ranger won't see them so we're good. At some point we should audit all this. Or perhaps just nuke all TREE_OVERFLOW's at irange::set. For now, this will do. gcc/ChangeLog: PR tree-optimization/97721 * gimple-range.cc (get_tree_range): Drop overflow from constant= s. gcc/testsuite/ChangeLog: * gcc.dg/pr97721.c: New test.=