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

--- Comment #13 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Peter Bergner from comment #12)
> I'll try moving the test up earlier and testing with that.

So this fixes the ICEs on the two test cases above.  I'll try a full bootstrap
with it.

--- a/gcc/lra-constraints.cc
+++ b/gcc/lra-constraints.cc
@@ -5014,6 +5014,10 @@ combine_reload_insn (rtx_insn *from, rtx_insn *to)
   enum reg_class to_class, from_class;
   int n, nop;
   signed char changed_nops[MAX_RECOG_OPERANDS + 1];
+
+  if (!NONDEBUG_INSN_P (to))
+    return false;
+
   lra_insn_recog_data_t id = lra_get_insn_recog_data (to);
   struct lra_static_insn_data *static_id = id->insn_static_data;

Reply via email to