Fix memory leak in ipa-refernece
commit9966699d7a9d8e35c0c4cf9a945bcf90ef874f2d
authorJan Hubicka <jh@suse.cz>
Sun, 14 Feb 2021 22:24:44 +0000 (14 23:24 +0100)
committerJan Hubicka <jh@suse.cz>
Sun, 14 Feb 2021 22:24:44 +0000 (14 23:24 +0100)
treeccea6fc0d9125c254c87e2c6a23f8b8c7619cb06
parent4e3590d06cf8a06fcc460ccda6150483a0311bae
Fix memory leak in ipa-refernece

2021-02-14  Jan Hubicka  <hubicka@ucw.cz>
    Richard Biener  <rguether@suse.de>

PR ipa/97346
* ipa-reference.c (ipa_init): Only conditinally initialize
reference_vars_to_consider.
(propagate): Conditionally deninitialize reference_vars_to_consider.
(ipa_reference_write_optimization_summary): Sanity check that
reference_vars_to_consider is not allocated.
gcc/ipa-reference.c