https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126772
Bug ID: 126772
Summary: ICE:: in trunc_int_for_mode, at explow.cc:59 for
fixed-point negative shift
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: gjl at gcc dot gnu.org
Target Milestone: ---
_Accum shift (_Accum a)
{
return a << -1;
}
$ avr-gcc -S y.c
y.c: In function 'shift':
y.c:3:14: warning: left shift count is negative [-Wshift-count-negative]
3 | return a << -1;
| ^~
during RTL pass: expand
y.c:3:14: internal compiler error: in trunc_int_for_mode, at explow.cc:59
3 | return a << -1;
| ~~^~~~~
Target: avr
Configured with: ../../source/gcc-master/configure --target=avr --disable-nls
--with-dwarf2 --with-gnu-as --with-gnu-ld --with-long-double=64
--enable-languages=c,c++
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 17.0.0 20260722 (experimental) (GCC)