https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118484
Bug ID: 118484
Summary: ICE during IPA pass: cp in determine_versionability
ipa-cp.cc:467
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
CC: tschwinge at gcc dot gnu.org
Target Milestone: ---
Target: nvptx
Created attachment 60158
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60158&action=edit
OpenMP_VV testcase (C++; 5.2/unified_shared_mem/test_target_VirDestr.cpp),
slightly reduced
during IPA pass: cp
lto1: internal compiler error: Segmentation fault
0x1b8ad81 internal_error(char const*, ...)
/home/tob/repos/gcc/gcc/diagnostic-global-context.cc:517
0xe4ebef crash_signal
/home/tob/repos/gcc/gcc/toplev.cc:322
0x19dc933 determine_versionability
/home/tob/repos/gcc/gcc/ipa-cp.cc:467
0x19e60f4 ipcp_propagate_stage
/home/tob/repos/gcc/gcc/ipa-cp.cc:4028
0x19ec997 ipcp_driver
/home/tob/repos/gcc/gcc/ipa-cp.cc:6430
* * *
This occurs when compiling with Nvptx offload support the OpenMP_VV example
https://github.com/OpenMP-Validation-and-Verification/OpenMP_VV/blob/master/tests/5.2/unified_shared_mem/test_target_VirDestr.cpp
with g++ -fopenmp -Iompvv -O2
The issue occurs in the nvptx offloading device compiler.
* * *
Here:
0x00000000019dc933 in determine_versionability (node=0x7ffff7300990, info=0x0)
at /home/tob/repos/gcc/gcc/ipa-cp.cc:467
467 info->versionable = (reason == NULL);
segfaults because "info == NULL". It is called via:
#1 0x00000000019e60f5 in ipcp_propagate_stage (topo=0x7fffffffcc30) at
/home/tob/repos/gcc/gcc/ipa-cp.cc:4028
4023 if (node->has_gimple_body_p ()
4024 && opt_for_fn (node->decl, flag_ipa_cp)
4025 && opt_for_fn (node->decl, optimize))
4026 {
4027 ipa_node_params *info = ipa_node_params_sum->get (node);
4028 determine_versionability (node, info);
with
(gdb) p debug_tree(node->decl )
<function_decl 0x7ffff72f3e00 __dt_del