https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127155
Bug ID: 127155
Summary: [15 Regression] ICE in expand_fn_using_insn, at
internal-fn.cc:268 during
mips64el-unknown-linux-gnuabi64 gcc build
Product: gcc
Version: 15.3.1
Status: UNCONFIRMED
Keywords: build, ice-on-valid-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: mips64el-unknown-linux-gnuabi64
Originally reported at
https://gcc.gnu.org/pipermail/gcc-help/2026-August/145139.html
I am observing this ICE during build on the current gcc-15-branch:
libtool: compile: /repo/build-gcc-15-branch-mips64el/./gcc/xgcc -shared-
libgcc -B/repo/build-gcc-15-branch-mips64el/./gcc -nostdinc++ -L/repo/build-
gcc-15-branch-mips64el/mips64el-unknown-linux-gnuabi64/libstd
c++-v3/src -L/repo/build-gcc-15-branch-mips64el/mips64el-unknown-linux-
gnuabi64/libstdc++-v3/src/.libs -L/repo/build-gcc-15-branch-mips64el/mips64
el-unknown-linux-gnuabi64/libstdc++-v3/libsupc++/.libs -B/repo/g
cc-15-branch//binary-15-branch-20260824165809-r15-11502-g23525f49c22da2-
checking-yes-rtl-df-extra-mips64el/mips64el-unknown-linux-gnuabi64/bin/ -B/
repo/gcc-15-branch//binary-15-branch-20260824165809-r15-11502-g
23525f49c22da2-checking-yes-rtl-df-extra-mips64el/mips64el-unknown-linux-
gnuabi64/lib/ -isystem /repo/gcc-15-branch//binary-15-branch-20260824165809-
r15-11502-g23525f49c22da2-checking-yes-rtl-df-extra-mips64el/
mips64el-unknown-linux-gnuabi64/include -isystem /repo/gcc-15-branch//binary
-15-branch-20260824165809-r15-11502-g23525f49c22da2-checking-yes-rtl-df-
extra-mips64el/mips64el-unknown-linux-gnuabi64/sys-include -I/
repo/gcc-15-branch/libstdc++-v3/../libgcc -I/repo/build-gcc-15-branch-mips64
el/mips64el-unknown-linux-gnuabi64/libstdc++-v3/include/mips64el-unknown-
linux-gnuabi64 -I/repo/build-gcc-15-branch-mips64el/mips64el-
unknown-linux-gnuabi64/libstdc++-v3/include -I/repo/gcc-15-branch/libstdc++-
v3/libsupc++ -std=gnu++17 -nostdinc++ -D_GLIBCXX_SHARED -fno-implicit-
templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=19 -fd
iagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-
seed=floating_to_chars.lo -fimplicit-templates -g -O2 -D_GNU_SOURCE -
minterlink-mips16 -c /repo/gcc-15-branch/libstdc++-v3/src/c++17/fl
oating_to_chars.cc -fPIC -DPIC -D_GLIBCXX_SHARED -o floating_to_chars.o
during RTL pass: expand
/repo/gcc-15-branch/libstdc++-v3/src/c++17/floating_to_chars.cc: In function
'std::to_chars_result std::__floating_to_chars_hex(char*, char*, T, optional
<int>) [with T = long double]':
/repo/gcc-15-branch/libstdc++-v3/src/c++17/floating_to_chars.cc:895:60:
internal compiler error: in expand_fn_using_insn, at internal-fn.cc:268
895 | const int shortest_full_precision = full_hex_precision - trailing
_zeros;
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
~~~~~~
0x234914f internal_error(char const*, ...)
/repo/gcc-15-branch/gcc/diagnostic-global-context.cc:517
0xa7f51d fancy_abort(char const*, int, char const*)
/repo/gcc-15-branch/gcc/diagnostic.cc:1749
0x7d97e4 expand_fn_using_insn
/repo/gcc-15-branch/gcc/internal-fn.cc:268
0xfe1f64 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_
modifier, rtx_def**, bool)
/repo/gcc-15-branch/gcc/expr.cc:11470
0xfd93de expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_
modifier, rtx_def**, bool)
/repo/gcc-15-branch/gcc/expr.cc:9613
0xfd93de expand_expr(tree_node*, rtx_def*, machine_mode, expand_modifier)
/repo/gcc-15-branch/gcc/expr.h:323
0xfd93de expand_expr_real_2(separate_ops const*, rtx_def*, machine_mode,
expand_modifier)
/repo/gcc-15-branch/gcc/expr.cc:10716
0xfe2e73 expand_expr_real_gassign(gassign*, rtx_def*, machine_mode, expand_
modifier, rtx_def**, bool)
/repo/gcc-15-branch/gcc/expr.cc:11278
0xfe1e1d expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_
modifier, rtx_def**, bool)
/repo/gcc-15-branch/gcc/expr.cc:11460
0xfeb84c expand_expr(tree_node*, rtx_def*, machine_mode, expand_modifier)
/repo/gcc-15-branch/gcc/expr.h:323
0xfeb84c expand_operands(tree_node*, tree_node*, rtx_def*, rtx_def**, rtx_
def**, expand_modifier)
/repo/gcc-15-branch/gcc/expr.cc:9192
0xfd8dca expand_expr_real_2(separate_ops const*, rtx_def*, machine_mode,
expand_modifier)
/repo/gcc-15-branch/gcc/expr.cc:11202
0xfe2e73 expand_expr_real_gassign(gassign*, rtx_def*, machine_mode, expand_
modifier, rtx_def**, bool)
/repo/gcc-15-branch/gcc/expr.cc:11278
0xe97e65 expand_gimple_stmt_1
/repo/gcc-15-branch/gcc/cfgexpand.cc:4311
0xe97e65 expand_gimple_stmt
/repo/gcc-15-branch/gcc/cfgexpand.cc:4375
0xe992a7 expand_gimple_basic_block
/repo/gcc-15-branch/gcc/cfgexpand.cc:6491
0xe9bda7 execute
/repo/gcc-15-branch/gcc/cfgexpand.cc:7240
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.
xgcc -v
Using built-in specs.
COLLECT_GCC=/repo/build-gcc-15-branch-mips64el/./gcc/xgcc
Target: mips64el-unknown-linux-gnuabi64
Configured with: /repo/gcc-15-branch//configure --enable-languages=c,c++ --
enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-libsanitizer --with-sysroot=/usr/mips64el-unknow
n-linux-gnuabi64 --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --
target=mips64el-unknown-linux-gnuabi64 --with-ld=/usr/bin/mips64el-unknown-
linux-gnuabi64-ld --with-as=/usr/bin/mips64el-unknown-linux-g
nuabi64-as --disable-multilib --with-abi=64 --disable-libstdcxx-pch --prefix
=/repo/gcc-15-branch//binary-15-branch-20260824165809-r15-11502-g23525f49c22
da2-checking-yes-rtl-df-extra-mips64el
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.3.1 20260824 (GCC)
No issues on gcc-13,14,16-branch nor gcc-trunk.
gcc-15.3.0 release tag is also OK, so this seems to be a recent regression
only on this branch.