https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125789
Bug ID: 125789
Summary: internal compiler error: in expand_fn_using_insn, at
internal-fn.cc:270
Product: gcc
Version: 16.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: daniel.indictor at gmail dot com
Target Milestone: ---
Created attachment 64738
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64738&action=edit
expand_fn_using_insn reproducer
Apologies if this is a duplicate. I encountered this ICE on GCC16.1.0 shipped
with Debian, and in an older GCC (15.2) shipped with NixOS.
Reproduced on GCC16 with a NixOS laptop (AMD Ryzen 7 7840HS w/ Radeon 780M
Graphics) and Debian desktop (Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz).
Attached is the reproducer run from the Debian desktop.
Beginning of the stacktrace:
```
during RTL pass: expand
myreproducer.cpp: In function ‘bool
mynamespace::mysubspace::has_odd_parity(const unsigned char*)’:
myreproducer.cpp:25:43: internal compiler error: in expand_fn_using_insn, at
internal-fn.cc:270
25 | return ::mynamespace::has_parity(*arr_in);
| ^
0x1752458 internal_error(char const*, ...)
../../src/gcc/diagnostic-global-context.cc:787
0x175252a fancy_abort(char const*, int, char const*)
../../src/gcc/diagnostics/context.cc:1813
0x106e279 expand_fn_using_insn(gcall*, insn_code, unsigned int, unsigned int)
[clone .constprop.0]
../../src/gcc/internal-fn.cc:270
0x1b706fd expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool) [clone .constprop.1]
```