https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107088
--- Comment #1 from Stefan Schulze Frielinghaus <stefansf at linux dot ibm.com>
---
The patch introduces
scalar_int_mode int_mode;
if (REG_P (x) && is_int_mode (mode, &int_mode)
&& REG_VALUES (REGNO (x)) != NULL
&& (!cselib_current_insn || !DEBUG_INSN_P (cselib_current_insn)))
{
rtx copy = 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 = cselib_lookup (copy, narrow_mode_iter, 0, VOIDmode);
if (v)
{
rtx sub = lowpart_subreg (narrow_mode_iter, e->val_rtx, int_mode);
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 machine
which I could use for debugging?
The failing assert is
gcc_checking_assert (m_mode != E_VOIDmode);
which is triggered by get_known_wider. Would be interesting to see the initial
value of int_mode and if/how FOR_EACH_MODE_UNTIL actually ends up with
E_VOIDmode.