https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123394
Bug ID: 123394
Summary: ICE: in expand_debug_locations, at cfgexpand.cc:6064
at -O1 and above with -g and 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/dcGsKnvoE
*******************************************************************************
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
#include <immintrin.h>
__m256 a, b;
void c(__m256);
void __attribute__((target("avx512vl"))) d() {
e:
__m256 f = a * b;
__asm__ goto("" : : : : e);
c(f);
}
*******************************************************************************
Command Lines:
$ gcc -O1 -g -c small.c
during RTL pass: expand
small.c: In function 'd':
small.c:4:42: internal compiler error: in expand_debug_locations, at
cfgexpand.cc:6064
4 | void __attribute__((target("avx512vl"))) d() {
| ^
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.