This makes sure to release the vec<> of callees.

Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

2021-02-10  Richard Biener  <rguent...@suse.de>

        PR ipa/99029
        * ipa-pure-const.c (propagate_malloc): Use an auto_vec<>
        for callees.
---
 gcc/ipa-pure-const.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index 957217ae4ae..f045108af21 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -1937,7 +1937,7 @@ propagate_malloc (void)
          if (l->malloc_state == STATE_MALLOC_BOTTOM)
            continue;
 
-         vec<cgraph_node *> callees = vNULL;
+         auto_vec<cgraph_node *, 16> callees;
          for (cgraph_edge *cs = node->callees; cs; cs = cs->next_callee)
            {
              ipa_call_summary *es = ipa_call_summaries->get_create (cs);
-- 
2.26.2

Reply via email to