When installing a temporary recog_data, we need to zero-initialise
the insn field to indicate that none of the other contents are valid.
Bootstrap & regression test still in progress for x86_64-linux-gnu,
but it does fix the valgrind issue. OK to install if testing passes?
Richard
gcc/
PR middle-end/127330
* recog.h (recog_state_saver::recog_state_saver): Initialize
m_tmp_recog_data.insn
---
gcc/recog.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/recog.h b/gcc/recog.h
index 4d94fc26d94..70fa58910ca 100644
--- a/gcc/recog.h
+++ b/gcc/recog.h
@@ -468,6 +468,7 @@ inline recog_state_saver::recog_state_saver ()
: saved_recog_data_ptr (recog_data_ptr),
saved_alternative (which_alternative)
{
+ m_tmp_recog_data.insn = nullptr;
recog_data_ptr = &m_tmp_recog_data;
}
--
2.55.0