From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B2EC63858D3C; Tue, 18 Oct 2022 07:26:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B2EC63858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666078007; bh=KdEnMpdI8DTFEIHRlHaQhXh+ecz0h6j7xetddJqXKOY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VX829aca24X1574eIKZdx31dxtmAHDo7Dr6Kr/JjE6oHiqr1kp07hSHC66AMzvWUc YbVsZz7nVEFap+zChdiXWFoYQPG40LLM33BywyR8Y/IVsD8SSwUgl4SptKREtbOWlY umcBEO0msFefYPq0+7ziDQ6SLD8Whua3IDLhMbHo= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/107299] [13 regression] ICE in stage 1 after r13-3307-g8efc38347a7444 Date: Tue, 18 Oct 2022 07:26:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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=3D107299 --- Comment #5 from Richard Biener --- (In reply to Aldy Hernandez from comment #4) > (In reply to Aldy Hernandez from comment #3) > > We are failing while trying to fold: > >=20 > > c_92 =3D __builtin_copysignf128 (0.0, c_80(D)); > >=20 > > The problem is that c_92 is TFtype but 0.0 is _Float128. TFtype has a > > precision of 127 whereas _Float128 has a precision of 128. This causes= the > > assert in fold_using_range::fold_stmt to fail because range_compatible_= p is > > false. > >=20 > > Are both operands of copysign allowed to have different types / precisi= ons? >=20 > Sorry, what I meant to say is that c_92 is TFtype, whereas > __builtin_copysignf128 is assuming to return the type of the first operand > (0.0, which is _Float128). Is this correct? It looks like 0.0 has the wrong type here. Maybe the copysign is the result of folding that left us with unconverted 0.0 here? Reduced preprocessed source would be nice, but you can see if -fdump-tree-all-folding shows a bogus match.pd pattern (but the issue might= be in fold-const.cc as well).=