From: Jan Hubicka Date: Wed, 25 Nov 2020 19:33:00 +0000 (+0100) Subject: Copy arg_flags in duplication hoooks in ipa-modref X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5962efe9186559ada404ac8f9f56006648a5858e;p=gcc.git Copy arg_flags in duplication hoooks in ipa-modref * ipa-modref.c (modref_summaries::duplicate, modref_summaries_lto::duplicate): Copy arg_flags. (remap_arg_flags): Fix remapping of arg_flags. --- diff --git a/gcc/ipa-modref.c b/gcc/ipa-modref.c index e6cb4a87b69..0ba1a748257 100644 --- a/gcc/ipa-modref.c +++ b/gcc/ipa-modref.c @@ -2142,6 +2142,8 @@ modref_summaries::duplicate (cgraph_node *, cgraph_node *dst, src_data->loads->max_accesses); dst_data->loads->copy_from (src_data->loads); dst_data->writes_errno = src_data->writes_errno; + if (src_data->arg_flags.length ()) + dst_data->arg_flags = src_data->arg_flags.copy (); } /* Called when new clone is inserted to callgraph late. */ @@ -2165,6 +2167,8 @@ modref_summaries_lto::duplicate (cgraph_node *, cgraph_node *, src_data->loads->max_accesses); dst_data->loads->copy_from (src_data->loads); dst_data->writes_errno = src_data->writes_errno; + if (src_data->arg_flags.length ()) + dst_data->arg_flags = src_data->arg_flags.copy (); } namespace @@ -2690,7 +2694,7 @@ remap_arg_flags (auto_vec &arg_flags, clone_info *info) if (o >= 0 && (int)old.length () > o && old[o]) max = i; } - if (max > 0) + if (max >= 0) arg_flags.safe_grow_cleared (max + 1, true); FOR_EACH_VEC_SAFE_ELT (info->param_adjustments->m_adj_params, i, p) {