From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 04F393858435; Wed, 22 Nov 2023 17:29:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 04F393858435 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700674185; bh=UcT+qfAZakKmy7LGqBxTwaejyfJeDEMS6Y1rMIPFTB8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PhXvUFd37WqRZi+lcuG6iy22DTVduqEH5Q0QLXEWygRhcPI4McbFdGc0jv7Sudeo3 e2z9oySBGKo34tJ2BvgfuKVS7fqF/ugNkM605HjegmtDNNkd+AtMHVwSe7+/FiIQAq h5oWmR3lzSggjKRAaUiTRI6yV0WT5oFZlK7Oi6OE= From: "amacleod at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/111922] [11/12/13/14 Regression] ICE in cp with -O2 -fno-tree-fre Date: Wed, 22 Nov 2023 17:29:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: amacleod at redhat dot com 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: 11.5 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=3D111922 --- Comment #7 from Andrew Macleod --- Explicit casts would be no problem as they go through the proper machinery.= The IL for that case has an explicit cast in it. _1 =3D (int) x_2(D); foo (_1); its when that cast is not present,and we try to, say subtract two values, t= hat we have a problem. we expect the compiler to promote things to be compatib= le when they are suppose to be. This would apply to dual operand arithmetic li= ke +, -, /, *, bitwise ops, etc. The testcase in particular is a bitwise not... but it has a return type tha= t is 64 bits and a operand type that is 32. It was expected that the compiler w= ould promote the operand to 64 bits if it expects a 64 bit result. At least for those tree codes which expect compatible types.. I don't think we want to get into overruling decisions at the range-ops lev= el.. So we decide whether to trap (which would be the same result as we see now :-P), or handle it some other way. returning VARYING was my thought.. beca= use it means something is amuck so say we dont know anything. Alternatively, if IPA could figure out when things need promoting.. GCC mu= st already do it, although I suppose thats in the front ends :-P=