[gcc r16-7112] rtl-optimization/106859 - fix location dumping from var-tracking
Richard Biener
rguenth@gcc.gnu.org
Wed Jan 28 11:52:56 GMT 2026
https://gcc.gnu.org/g:974182ec0985dfce4960d07cae5f28ae2f70874e
commit r16-7112-g974182ec0985dfce4960d07cae5f28ae2f70874e
Author: Richard Biener <rguenther@suse.de>
Date: Wed Jan 28 10:16:29 2026 +0100
rtl-optimization/106859 - fix location dumping from var-tracking
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.
Diff:
---
gcc/var-tracking.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/var-tracking.cc b/gcc/var-tracking.cc
index c95ca075a5f9..bfe75b0577d6 100644
--- a/gcc/var-tracking.cc
+++ b/gcc/var-tracking.cc
@@ -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);
}
}
More information about the Gcc-cvs
mailing list