https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116600
Bug ID: 116600
Summary: internal compiler error: in maybe_record_trace_start,
at dwarf2cfi.cc:2584
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: yury.khrustalev at arm dot com
Target Milestone: ---
Host: aarch64-none-linux-gnu
Target: aarch64-none-linux-gnu
Build: aarch64-none-linux-gnu
Created attachment 59049
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59049&action=edit
Reduced reproducer from kernel/events/core.c
ICE when cross-compiling Linux kernel at v6.11-rc3 (7c626ce4bae1) for
aarch64-none-linux-gnu target.
GCC code at: e4d3e7f9add (exists in upstream master branch), however the same
or very similar error occurs with the provided reproducer using GCC 10, 11, 12,
13, 14 as well.
See attached reduced reproducer and command below along with the output
(replace $SRC with path to GCC sources):
$ aarch64-none-linux-gnu-gcc -c -O -Wfatal-errors testcase.i -O2 -o /dev/null
Output (warnings omitted):
during RTL pass: dwarf2
testcase.i: In function ‘__arm64_sys_perf_event_open’:
testcase.i:20:56: internal compiler error: in maybe_record_trace_start, at
dwarf2cfi.cc:2584
20 | void __arm64_sys_perf_event_open() { perf_copy_attr(); }
| ^
0x24d3b07 internal_error(char const*, ...)
$SRC/gcc/diagnostic-global-context.cc:492
0x24c10ef fancy_abort(char const*, int, char const*)
$SRC/gcc/diagnostic.cc:1658
0xad32d7 maybe_record_trace_start
$SRC/gcc/dwarf2cfi.cc:2584
0xad3787 create_trace_edges
$SRC/gcc/dwarf2cfi.cc:2680
0xad3b4b scan_trace
$SRC/gcc/dwarf2cfi.cc:2911
0xad460b create_cfi_notes
$SRC/gcc/dwarf2cfi.cc:2938
0xad460b execute_dwarf2_frame
$SRC/gcc/dwarf2cfi.cc:3309
0xad460b execute
$SRC/gcc/dwarf2cfi.cc:3797
GCC configured with:
$ aarch64-none-linux-gnu-gcc -v
Output:
Using built-in specs.
COLLECT_GCC=/path/to/toolchain/bin/aarch64-none-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/path/to/toolchain/bin/../libexec/gcc/aarch64-none-linux-gnu/15.0.0/lto-wrapper
Target: aarch64-none-linux-gnu
Configured with: $SRC/configure --target=aarch64-none-linux-gnu --prefix=
--with-sysroot=/aarch64-none-linux-gnu/libc
--with-build-sysroot=/path/to/toolchain/aarch64-none-linux-gnu/libc
--enable-gnu-indirect-function --enable-shared --disable-libssp
--disable-libmudflap --enable-checking=yes --enable-languages=c,c++,fortran
--with-gmp=/path/to/host --with-mpfr=/path/to/host --with-mpc=/path/to/host
--with-isl=/path/to/host
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240902 (experimental) (GCC)
Dependencies:
- gmp-6.2.1
- mpfr-4.2.1
- mpc-1.3.1
- isl-0.24