https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123386
Bug ID: 123386
Summary: ICE on x86_64-linux-gnu: in maybe_record_trace_start,
at dwarf2cfi.cc:2591 at -O1 with asm goto
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: jiangchangwu at smail dot nju.edu.cn
Target Milestone: ---
Compiler Explorer: https://godbolt.org/z/qn6Kr8Exr
*******************************************************************************
gcc version:
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/compiler/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/16.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --disable-multilib --disable-bootstrap
--enable-languages=c,c++ --prefix=/compiler/gcc-trunk --enable-coverage
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 16.0.0 20251229 (experimental) (GCC)
*******************************************************************************
Program:
$ cat small.c
char *a;
int b;
void e(char *) {
if (b)
__builtin_abort();
}
void f(char *c) {
__asm__ goto("" : : : : d);
e(a);
__asm__ goto("" : : : : d);
if (c)
f(a);
__asm__ goto("" : : : : d);
d:
if (b)
__builtin_abort();
}
*******************************************************************************
Command Lines:
$ gcc -O1 -c small.c
during RTL pass: dwarf2
small.c: In function 'f':
small.c:17:1: internal compiler error: in maybe_record_trace_start, at
dwarf2cfi.cc:2591
17 | }
| ^
0x5740443 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x5725716 internal_error(char const*, ...)
???:0
0x5740c16 fancy_abort(char const*, int, char const*)
???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.