This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Unset m_checker in sem_function::init.


Hi.

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.

Thanks,
Martin

gcc/ChangeLog:

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 --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.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]