public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/110800] New: [gcn] ICE (segfault) 'during RTL pass: jump' in delete_trivially_dead_insns -> count_reg_usage
@ 2023-07-25 10:05 burnus at gcc dot gnu.org
2023-07-25 10:18 ` [Bug target/110800] [gcn] ICE (segfault) 'during RTL pass: jump' in delete_trivially_dead_insns -> count_reg_usage when C++ exceptions are enabled + used burnus at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: burnus at gcc dot gnu.org @ 2023-07-25 10:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110800
Bug ID: 110800
Summary: [gcn] ICE (segfault) 'during RTL pass: jump' in
delete_trivially_dead_insns -> count_reg_usage
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
CC: grahams at gcc dot gnu.org
Target Milestone: ---
Target: amdgcn-amdhsa
Testcase is test_target_PureVirDestr.cpp at
https://github.com/SOLLVE/sollve_vv/pull/751
Simply go to any sollve_vv directory, run "wget" on
https://raw.githubusercontent.com/SOLLVE/sollve_vv/a3be96d534124e744acc979e2e33b402a1b330cd/tests/5.2/unified_shared_mem/test_target_PureVirDestr.cpp
And then compile, e.g. as follows. (Tested with mainline; comments in the pull
request indicate that OG13 fails identically.)
g++ -foffload-options=-march=gfx90a -fopenmp -I ompvv/ -DVERBOSE_MODE=1
test_target_PureVirDestr.cpp
The segfault happens for:
#0 0x00000000019175cc in count_reg_usage (x=<optimized out>, counts=0x2e618e0,
dest=<optimized out>, incr=1) at gcc/rtl.h:1934
1934 return REG_CHECK (x)->regno;
which is called (same function) as
1511 return XEXP (insn, 3);
which is called in
#2 0x000000000191c86b in delete_trivially_dead_insns (insns=<optimized out>,
nreg=514) at gcc/cse.cc:7012
7012 count_reg_usage (insn, counts, NULL_RTX, 1);
(gdb) p debug_rtx(insn)
(insn 132 133 119 7 (set (reg:DI 508)
(reg:DI -1)) "test_target_PureVirDestr.cpp":57:5 8 {*movdi_insn}
(nil))
The ICE is:
during RTL pass: jump
test_target_PureVirDestr.cpp: In member function '__ct_base ':
test_target_PureVirDestr.cpp:57:5: internal compiler error: Segmentation fault
57 | }
| ^
0x101ad9f crash_signal gcc/toplev.cc:314
0x7f463959408f ??? sysv/linux/x86_64/sigaction.c:0
0x19175cc count_reg_usage gcc/cse.cc:6748
0x19173ea count_reg_usage gcc/cse.cc:6788
0x191c86a delete_trivially_dead_insns(rtx_insn*, int)
gcc/cse.cc:7012
0x18dc5c6 execute gcc/cfgcleanup.cc:3237
...
gcn mkoffload: fatal error:
../../install/bin/x86_64-none-linux-gnu-accel-amdgcn-amdhsa-gcc returned 1 exit
status
compilation terminated.
lto-wrapper: fatal error:
.../install/libexec/gcc/x86_64-none-linux-gnu/14.0.0//accel/amdgcn-amdhsa/mkoffload
returned 1 exit status
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/110800] [gcn] ICE (segfault) 'during RTL pass: jump' in delete_trivially_dead_insns -> count_reg_usage when C++ exceptions are enabled + used
2023-07-25 10:05 [Bug target/110800] New: [gcn] ICE (segfault) 'during RTL pass: jump' in delete_trivially_dead_insns -> count_reg_usage burnus at gcc dot gnu.org
@ 2023-07-25 10:18 ` burnus at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: burnus at gcc dot gnu.org @ 2023-07-25 10:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110800
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[gcn] ICE (segfault) |[gcn] ICE (segfault)
|'during RTL pass: jump' in |'during RTL pass: jump' in
|delete_trivially_dead_insns |delete_trivially_dead_insns
|-> count_reg_usage |-> count_reg_usage when C++
| |exceptions are enabled +
| |used
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
The ICE is turned into plenty of linker errors (such as 'undefined symbol:
operator delete[](void*)') when compiling with:
-fno-exceptions
It seems as if something goes wrong when exceptions are encountered. Still, an
ICE is wrong.
For the sister testcase, test_target_struct_obj_access.cpp (same pull request),
it fails with tons of:
cc45cyOP.mkoffload.2.s:2601:1: error: symbol '.LEHE1' is already defined
That's actually how I found the -fno-exception as LEHE is added in
gcc/except.cc: ASM_GENERATE_INTERNAL_LABEL (reg_start_lab, "LEHB",
call_site_base + i);
gcc/final.cc: ASM_OUTPUT_DEBUG_LABEL (asm_out_file, "LEHB",
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-25 10:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-25 10:05 [Bug target/110800] New: [gcn] ICE (segfault) 'during RTL pass: jump' in delete_trivially_dead_insns -> count_reg_usage burnus at gcc dot gnu.org
2023-07-25 10:18 ` [Bug target/110800] [gcn] ICE (segfault) 'during RTL pass: jump' in delete_trivially_dead_insns -> count_reg_usage when C++ exceptions are enabled + used burnus at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).