]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rtl-optimization/106859 - fix location dumping from var-tracking
authorRichard Biener <rguenther@suse.de>
Wed, 28 Jan 2026 09:16:29 +0000 (10:16 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 28 Jan 2026 11:52:30 +0000 (12:52 +0100)
We currently ICE when the locations include one without a setting insn.
Looking at cselib this seems to be a supported state so the following
arranges for this and dumps -1 as UID.

PR rtl-optimization/106859
* var-tracking.cc (val_store): Dump -1 as UID if setting_insn
is NULL.

gcc/var-tracking.cc

index c95ca075a5f993c389e78a87d8eda7ea12fb235f..bfe75b0577d64f669bfbd1ea71f947a893f77728 100644 (file)
@@ -2519,7 +2519,8 @@ val_store (dataflow_set *set, rtx val, rtx loc, rtx_insn *insn,
          struct elt_loc_list *l;
          for (l = v->locs; l; l = l->next)
            {
-             fprintf (dump_file, "\n%i: ", INSN_UID (l->setting_insn));
+             fprintf (dump_file, "\n%i: ",
+                      l->setting_insn ? INSN_UID (l->setting_insn) : -1);
              print_inline_rtx (dump_file, l->loc, 0);
            }
        }