Unset m_checker in sem_function::init.
diff mbox series

Message ID e2c53e76-3e02-84db-4838-f0fd2c91a2b7@suse.cz
State New
Headers show
  • Unset m_checker in sem_function::init.
Related show

Commit Message

Martin Liška Nov. 18, 2019, 1:04 p.m. UTC

The patch is obvious fix where I forgot to unset m_checker.
No doing that, we call delete m_checker for one which is allocated
on stack.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
I'm going to install the patch.



2019-11-18  Martin Liska  <mliska@suse.cz>

	PR ipa/92525
	* ipa-icf.c (sem_function::init): Unset m_checker
	at the end of the function.
  gcc/ipa-icf.c | 2 ++
  1 file changed, 2 insertions(+)

diff mbox series

diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index 15aac1cdbe6..7762f939391 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -1410,6 +1410,8 @@  sem_function::init (ipa_icf_gimple::func_checker *checker)
       hstate.add_flag (cnode->thunk.virtual_offset_p);
       gcode_hash = hstate.end ();
+  m_checker = NULL;
 /* Improve accumulated hash for HSTATE based on a gimple statement STMT.  */