https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98815
--- Comment #2 from Feng Xue <fxue at os dot amperecomputing.com> --- If we step into free_dominance_info(dir), it is a wrapper of free_dominance_info (cfun, dir), which means it assumes a non-NULL "cfun". Additionally, please go through calling stack of free_dominance_info(): free_dominance_info () -> if (!dom_info_available_p ()) -> dom_info_state (fn, dir) != DOM_NONE -> if (!fn->cfg) return DOM_NONE; This shows when "fn->cfg" is NULL, free_dominance_info() does nothing. Above all, if conditional check "cfun && fn->cfg" is true, two calls to free_dominance_info() in cgraph_node::analyze() are redundant, and if the check is false, these calls are trival. So we could remove those calls in cgraph_node::analyze(), not execute_pass_list().