From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 16F673AA8CAE; Thu, 17 Nov 2022 15:54:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 16F673AA8CAE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668700446; bh=FOLQk1uCj5eCcx38Uwbgb9tA7wzTGck57mK0haeSuVA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Uc6Vr4vZJbBY3rq4Pu2JYL8YxH64zhbA+onMfCLEjIOV2+q2Aw9z77+VQ76+NfTbH NrUFUnLmRcEcLRQb3bvnNhTMUohYYT59zZE6GbsZ/gUzjP3ndfiQWKszQpX3oT8HR/ uB2wb+MYVtDmeLgqeAS+yVnDa0BsQ+R0o0pbNHqA= From: "aldyh at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107732] ICE in lower_bound, at value-range.h:350 Date: Thu, 17 Nov 2022 15:54:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: aldyh at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107732 --- Comment #1 from Aldy Hernandez --- Created attachment 53920 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53920&action=3Dedit untested [PR tree-optimization/107732] [range-ops] Handle attempt to abs() negatives. The threader is creating a scenario where we are trying to solve: [NEGATIVES] =3D abs(x) While solving this we have an intermediate value of UNDEFINED because we have no positive numbers. But then we try to union the negative pair to the final result by querying the bounds. Since neither UNDEFINED nor NAN have bounds, they need to be specially handled.=