https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101737

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
                 CC|                            |marxin at gcc dot gnu.org
   Last reconfirmed|                            |2021-08-03

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, reduced test-case:

$ cat pr101737.c
int fast_composite_scaled_nearest_8888_8888_cover_SRC_info_1,
    fast_composite_scaled_nearest_8888_8888_cover_SRC_info_0,
    fast_composite_scaled_nearest_8888_8888_cover_SRC_dst;

void
fast_composite_scaled_nearest_8888_8888_cover_SRC() {
  int width =
      fast_composite_scaled_nearest_8888_8888_cover_SRC_info_0;
  while (fast_composite_scaled_nearest_8888_8888_cover_SRC_info_1) {
    int w = fast_composite_scaled_nearest_8888_8888_cover_SRC_info_0;
    while ((w -= 2) >= 0)
      fast_composite_scaled_nearest_8888_8888_cover_SRC_dst++;
    if (w & 1)
      fast_composite_scaled_nearest_8888_8888_cover_SRC_dst = 0;
  }
}

crash happens for the following RTX instruction:
(code_label 40 31 87 4 5 (nil) [1 uses])

bool
sh_is_nott_insn (const rtx_insn* i)
{
  return i != NULL && GET_CODE (PATTERN (i)) == SET
         && t_reg_operand (XEXP (PATTERN (i), 0), VOIDmode)
         && negt_reg_operand (XEXP (PATTERN (i), 1), VOIDmode);
}

Reply via email to