From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 51C7A3857354; Thu, 29 Sep 2022 18:33:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 51C7A3857354 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664476435; bh=DgFpp/UvdV8P+IOckxhwsSCakYMinr68vtQJPzJId9w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jKeu0sogHZNK0q/8f7G/ia2OtbZAfavUvjxIhEb0PftG/6pHe5SVEcO8atltNhovc ubllQ0UpnqGZY9BHhKGXAvxK2skYAnsj9a7wYDp1VVficG/Qi88HcM0BL2NzAMiiwq 8amIxpxV5iEuWj+Zo5AfL+Thqo/2Sf55dE+02THU= From: "stefansf at linux dot ibm.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/107088] [13 Regression] cselib ICE building __trunctfxf2 on ia64 Date: Thu, 29 Sep 2022 18:33:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: stefansf at linux dot ibm.com X-Bugzilla-Status: UNCONFIRMED 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=3D107088 --- Comment #1 from Stefan Schulze Frielinghaus --- The patch introduces scalar_int_mode int_mode; if (REG_P (x) && is_int_mode (mode, &int_mode) && REG_VALUES (REGNO (x)) !=3D NULL && (!cselib_current_insn || !DEBUG_INSN_P (cselib_current_insn))) { rtx copy =3D shallow_copy_rtx (x); scalar_int_mode narrow_mode_iter; FOR_EACH_MODE_UNTIL (narrow_mode_iter, int_mode) // <-------- { PUT_MODE_RAW (copy, narrow_mode_iter); cselib_val *v =3D cselib_lookup (copy, narrow_mode_iter, 0, VOIDmod= e); if (v) { rtx sub =3D lowpart_subreg (narrow_mode_iter, e->val_rtx, int_m= ode); if (sub) new_elt_loc_list (v, sub); } } } The failing assert is at the for-loop which is supposed to iterate only over integer modes up to int_mode. I'm not familiar with ia64; is there any mach= ine which I could use for debugging? The failing assert is gcc_checking_assert (m_mode !=3D E_VOIDmode); which is triggered by get_known_wider. Would be interesting to see the init= ial value of int_mode and if/how FOR_EACH_MODE_UNTIL actually ends up with E_VOIDmode.=