From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E64C1385456F; Thu, 17 Nov 2022 17:43:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E64C1385456F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668707005; bh=n+YahnK7kIAofg/mB8N+erWTYz8O7vxuMEkptodabhw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Vtp+LWLESEOvCmdU/EiyYt1STh2tgENaxYBDshrLZ9lnbdTv7LWmUrpLmh3/EWJe6 Cg8gCIigE4cKg3UjEloOPmOIusz9u+ZhVJnP217DgHW929FLNfgwIUL75GbKbwxy0h 362tVbYKFPRvQLm5sz5hif7Zf4TsdPd6W2bGLKBQ= From: "cvs-commit 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 17:43:25 +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: cvs-commit 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: 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 #4 from CVS Commits --- The master branch has been updated by Aldy Hernandez : https://gcc.gnu.org/g:4e306222f442f8d4c6fc6da997ab756a5e43e36e commit r13-4131-g4e306222f442f8d4c6fc6da997ab756a5e43e36e Author: Aldy Hernandez Date: Thu Nov 17 16:47:17 2022 +0100 [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. PR tree-optimization/107732 gcc/ChangeLog: * range-op-float.cc (foperator_abs::op1_range): Early exit when result is undefined. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr107732.c: New test.=