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

--- Comment #2 from Peter Bergner <bergner at gcc dot gnu.org> ---
So we're hitting this code in lra-assigns.c:lra_assign():1612:

  if (flag_checking && !flag_ipa_ra)
    for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
      if (lra_reg_info[i].nrefs != 0 && reg_renumber[i] >= 0
          && lra_reg_info[i].call_p
          && overlaps_hard_reg_set_p (call_used_reg_set,
                                      PSEUDO_REGNO_MODE (i), reg_renumber[i]))
        gcc_unreachable ();

Our pseudo (i == 184) had been assigned to r9 (a call clobbered reg) and yet
lra_reg_info[184].call_p is true, leading to the assert.

Looking through the rtl dumps, pseudo 184 is live only over two consecutive
insns, so clearly call_p should not be true here.  I'm tracking down where that
is getting set.

Reply via email to