From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 29FB43858C50; Sun, 1 May 2022 12:19:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 29FB43858C50 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/105432] [13 regression] bootstrap build error in mpfr in stage2 Date: Sun, 01 May 2022 12:19:35 +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: 13.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: aldyh at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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: Sun, 01 May 2022 12:19:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105432 --- Comment #11 from CVS Commits --- The trunk branch has been updated by Aldy Hernandez : https://gcc.gnu.org/g:75bbc3da3e5f75f683fa33e309045c582efd20eb commit r13-60-g75bbc3da3e5f75f683fa33e309045c582efd20eb Author: Aldy Hernandez Date: Fri Apr 29 22:46:25 2022 +0200 Denormalize VR_VARYING to VR_RANGE before passing it to set_range_info_= raw. We are ICEing in set_range_info_raw because value_range_kind cannot be VR_VARYING, since SSA_NAME_RANGE_TYPE can only hold VR_RANGE / VR_ANTI_RANGE. Most of the time setting a VR_VARYING as a global range makes no sense. However, we can have a range spanning the entire domain (VR_RANGE of [MIN,MAX] which is essentially a VR_VARYING), if the nonzero bits are set. This was working before because set_range_info_raw allows setting VR_RANGE of [MIN, MAX]. However, when going through an irange, we normalize this to a VR_VARYING, thus causing the ICE. It's interesting that other calls to set_range_info with an irange haven't triggered this. One solution would be to just ignore VR_VARYING and bail, since set_range_info* is really an update of the current range semantic wise. After all, we keep the nonzero bits which provide additional info. But this would be a change in behavior, so not suitable until after GCC 12 is released. So in order to keep with current behavior we can just denormalize the varying to VR_RANGE. Tested on x86-64 Linux. PR tree-optimization/105432 gcc/ChangeLog: * tree-ssanames.cc (set_range_info): Denormalize VR_VARYING to VR_RANGE before passing a piecewise range to set_range_info_raw= .=