From: Jørgen Kvalsvik Date: Fri, 28 Jun 2024 06:35:31 +0000 (+0200) Subject: Use move-aware auto_vec in map X-Git-Tag: basepoints/gcc-16~7843 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86451e10f6e3bad0c719a9e30f1d9dea36819025;p=thirdparty%2Fgcc.git Use move-aware auto_vec in map Using auto_vec rather than vec for means the vectors are release automatically upon return, to stop the leak. The problem seems is that auto_vec is not really move-aware, only the specialization is. gcc/ChangeLog: * tree-profile.cc (find_conditions): Use auto_vec without embedded storage. --- diff --git a/gcc/tree-profile.cc b/gcc/tree-profile.cc index 8c9945847ca..153c9323040 100644 --- a/gcc/tree-profile.cc +++ b/gcc/tree-profile.cc @@ -876,7 +876,7 @@ find_conditions (struct function *fn) make_top_index (fnblocks, ctx.B1, ctx.top_index); /* Bin the Boolean expressions so that exprs[id] -> [x1, x2, ...]. */ - hash_map, auto_vec> exprs; + hash_map, auto_vec> exprs; for (basic_block b : fnblocks) { const unsigned uid = condition_uid (fn, b);