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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2025-03-05 00:00:00         |2026-1-28

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
Re-confirmed.

Program received signal SIGSEGV, Segmentation fault.
0x0000000001512c42 in modref_tree<int>::merge (this=0x0, max_bases=32, 
    max_refs=16, max_accesses=16, other=0x7ffff6664e20, 
    parm_map=0x7fffffff9a50 = {...}, static_chain_map=0x7fffffff9c70, 
    record_accesses=false, promote_unknown_to_global=false)
    at /space/rguenther/src/gcc-clean/gcc/ipa-modref-tree.h:533
533         if (!other || every_base)
(gdb) p this
$1 = (modref_tree<int> * const) 0x0
#2  0x0000000001506756 in ipa_merge_modref_summary_after_inlining (
    edge=<cgraph_edge* 0x7ffff680b410 (<cgraph_node * 0x7ffff669e110
"XXH64_freeState"/1> -> <cgraph_node * 0x7ffff669e770 "XXH32_freeState"/0>)>)
    at /space/rguenther/src/gcc-clean/gcc/ipa-modref.cc:5404
5404                to_info->stores->merge (to->decl, callee_info->stores,
&parm_map,
(gdb) l
5399          compute_parm_map (edge, &parm_map);
5400
5401          if (!ignore_stores)
5402            {
5403              if (to_info && callee_info)
5404                to_info->stores->merge (to->decl, callee_info->stores,
&parm_map,
5405                                        &chain_map, false);
5406              if (to_info_lto && callee_info_lto)
5407                to_info_lto->stores->merge (to->decl,
callee_info_lto->stores,
5408                                            &parm_map, &chain_map, false);

what's noticeable is that we do

  struct cgraph_node *to = (edge->caller->inlined_to
                            ? edge->caller->inlined_to : edge->caller);
  class modref_summary *to_info = summaries ? summaries->get (to) : NULL;
  class modref_summary_lto *to_info_lto = summaries_lto
                                          ? summaries_lto->get (to) : NULL;

and

(gdb) p to_info_lto->stores
$4 = (modref_records_lto *) 0x7ffff6664de0
(gdb) p to_info->stores
$5 = (modref_records *) 0x0

and we do

  bool ignore_stores = ignore_stores_p (edge>caller->decl, flags);

not t->decl here (but using that doesn't fix it).

That said, maybe !to_info->stores or !to_info_lto->stores is OK?

Honza, please have a look.

Reply via email to