https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119568
Bug ID: 119568
Summary: [avr] ICE: in find_widening_optab_handler_and_mode, at
optabs-query.cc:498
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: gjl at gcc dot gnu.org
Target Milestone: ---
unsigned _Fract p2m1_remez (unsigned _Fract x)
{
unsigned _Fract a0 = 3.704e-06ur;
unsigned _Fract a1 = 6.929e-01ur;
unsigned _Accum y;
y = x + a1;
y = y * x + a0;
return y;
}
$ avr-gcc ice-optab.c -S -Os
during GIMPLE pass: widening_mul
ice-optab.c: In function 'p2m1_remez':
ice-optab.c:1:17: internal compiler error: in
find_widening_optab_handler_and_mode, at optabs-query.cc:498
1 | unsigned _Fract p2m1_remez (unsigned _Fract x)
| ^~~~~~~~~~
This ICE occurs with current trunk.
With v13 and v14, it seems the compiler is hanging in an infinite loop:
$ avr-gcc-14 ice-optab.c -S -Os -Q -v
...
Analyzing compilation unit
Performing interprocedural optimizations
<*free_lang_data> {heap 848k} <visibility> {heap 848k} <build_ssa_passes>
{heap 848k} <opt_local_passes> {heap 1120k} <remove_symbols> {heap 1576k}
<targetclone> {heap 1576k} <free-fnsummary> {heap 1576k} <emutls> {heap
1576k}Streaming LTO
<whole-program> {heap 1576k} <profile_estimate> {heap 1576k} <icf> {heap
1576k} <devirt> {heap 1576k} <cp> {heap 1576k} <sra> {heap 1576k} <fnsummary>
{heap 1576k} <inline> {heap 1576k} <pure-const> {heap 1576k} <modref> {heap
1576k} <free-fnsummary> {heap 1576k} <static-var> {heap 1576k} <single-use>
{heap 1576k} <comdats> {heap 1576k}Assembling functions:
p2m1_remez [GCC HANGS IN INFINITE LOOP?]
Target: avr
Configured with: ../../source/gcc-14/configure --target=avr --disable-nls
--enable-languages=c,c++ --with-gnu-as --with-gnu-ld --disable-shared
--with-long-double=64 --enable-checking=release --disable-libcc1
--disable-libssp
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 14.2.1 20250323 (GCC)