From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1585F3860760; Wed, 22 Nov 2023 16:25:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1585F3860760 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700670334; bh=2nCJcUtRwsyFCEpgRf1lzqzgTJpWGZdd5JmdTJhxZ4s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=c0i5NJj12hjCQBih+HCYk5KSevHqkBGmPChcIFRMmimFj2GgIPtJ1XMQqJc9ihoHx L3r0WPm9oHxUamnuO9JuJgv6aETVUUiKyqMHBkVjAj8ZkX77F0SKJPm0Ak1EECcZFw bnluM9B742kMY2X9Jt/QqIx2pLfA2vnQqaZ2vyfM= 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 16:25:33 +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 #5 from Andrew Macleod --- (In reply to Jakub Jelinek from comment #4) >=20 > I think > Value_Range vr (operand_type); > if (TREE_CODE_CLASS (operation) =3D=3D tcc_unary) > ipa_vr_operation_and_type_effects (vr, > src_lats->m_value_range.m_vr, > operation, param_type, > operand_type); > should be avoided if param_type is not a compatible type to operand_type, > unless operation is some cast operation (NOP_EXPR, CONVERT_EXPR, dunno if > the float to integral or vice versa ops as well but vrp probably doesn't > handle that yet). > In the above case, param_type is struct A *, i.e. pointer, while > operand_type is int. the root of the issue is that the precisions are different, and we're invok= ing an operation which expects the precisions to be the same (minus in this cas= e).=20 we can't deal with this in dispatch because some operations allow the LH a= nd RH to be different precisions or even types. It also seems like overkill to have every operation check the incoming precision, but perhaps not... we could limit it to the wi_fold() subsets.. = let me have a look. if we get incompatible types, perhaps returning VARYING sho= uld be OK?=