Call toplev::finalize in CHECKING_P mode.

gcc/ChangeLog:

	PR jit/98615
	* main.c (main): Call toplev::finalize in CHECKING_P mode.
	* ipa-modref.c (ipa_modref_c_finalize): summaries are NULL
	when incremental LTO linking happens.
This commit is contained in:
Martin Liska 2021-01-11 18:12:54 +01:00
parent 95dfc3ac7b
commit a63035ae26
2 changed files with 8 additions and 2 deletions

View File

@ -3867,7 +3867,8 @@ ipa_modref_c_finalize ()
if (optimization_summaries)
ggc_delete (optimization_summaries);
optimization_summaries = NULL;
gcc_checking_assert (!summaries);
gcc_checking_assert (!summaries
|| flag_incremental_link == INCREMENTAL_LINK_LTO);
if (summaries_lto)
ggc_delete (summaries_lto);
summaries_lto = NULL;

View File

@ -36,5 +36,10 @@ main (int argc, char **argv)
toplev toplev (NULL, /* external_timer */
true /* init_signals */);
return toplev.main (argc, argv);
int r = toplev.main (argc, argv);
#if CHECKING_P
toplev.finalize ();
#endif
return r;
}