[Bug ipa/96291] [10/11 Regression] -flto fails as "internal compiler error: Segmentation fault" during IPA pass: cp incall_for_symbol_thunks_and_aliases()

slyfox at inbox dot ru gcc-bugzilla@gcc.gnu.org
Fri Jul 24 18:08:18 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96291

--- Comment #4 from Sergei Trofimovich <slyfox at inbox dot ru> ---
Peeking at the crash:
"""
Program received signal SIGSEGV, Segmentation fault.
0x0000000001ca0fed in has_undead_caller_from_outside_scc_p
(node=0x7ffff7670438, data=0x0) at ../../gcc/gcc/ipa-cp.c:5670
5670                 && !IPA_NODE_REF (cs->caller)->node_dead)
(gdb) list
5665        if (cs->caller->thunk.thunk_p
5666            && cs->caller->call_for_symbol_thunks_and_aliases
5667              (has_undead_caller_from_outside_scc_p, NULL, true))
5668          return true;
5669        else if (!ipa_edge_within_scc (cs)
5670                 && !IPA_NODE_REF (cs->caller)->node_dead)
5671          return true;
5672      return false;
5673    }
5674

(gdb) print IPA_NODE_REF(cs->caller)
$1 = (ipa_node_params *) 0x0
"""

Is it an expected invariant? Looks like most of code does not expect NULL
there:

$ git grep IPA_NODE_REF | fgrep NULL
gcc/ipa-prop.c:   && IPA_NODE_REF (node) != NULL)
gcc/ipa-prop.c:   && IPA_NODE_REF (node) != NULL)


More information about the Gcc-bugs mailing list