https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125438
Bug ID: 125438
Summary: ICE on x86_64-linux-gnu: in maybe_record_trace_start,
at dwarf2cfi.cc:2546 at -O1 -fschedule-insns2
-fselective-scheduling2 -fsel-sched-pipelining with
asm goto before while statement
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: jiangchangwu at smail dot nju.edu.cn
Target Milestone: ---
Compiler Explorer: https://godbolt.org/z/nrM8nqocT
*******************************************************************************
gcc version:
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/compiler/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/17.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 17.0.0 20260430 (experimental) (GCC)
*******************************************************************************
Program:
$ cat small.c
void a() {
__asm__ goto("" : : : : b);
b:
while (1)
;
}
*******************************************************************************
Command Lines:
$ gcc -O1 -fschedule-insns2 -fselective-scheduling2 -fsel-sched-pipelining -c
small.c
during RTL pass: dwarf2
small.c: In function 'a':
small.c:6:1: internal compiler error: in maybe_record_trace_start, at
dwarf2cfi.cc:2546
6 | }
| ^
0x588e68b diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x587388a internal_error(char const*, ...)
???:0
0x588ee5e fancy_abort(char const*, int, char const*)
???:0
/compiler/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/17.0.0/cc1 -quiet
-imultiarch x86_64-linux-gnu small.c -quiet -dumpbase small.c -dumpbase-ext .c
-mtune=generic -march=x86-64 -O1 -fschedule-insns2 -fselective-scheduling2
-fsel-sched-pipelining -o /tmp/cc9pVNxR.s
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.