https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128699
Bug ID: 128699
Summary: ICE: verify_ssa failed in bitintlower at -O1 with a
negated _BitInt(127) converted to unsigned _BitInt(65)
(-m32, arm)
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: shimizu2486 at gmail dot com
Target Milestone: ---
Target: i686-linux-gnu, arm-linux-gnueabihf
Live reproducer: https://godbolt.org/z/hPE4zcd7G
$ cat t1.c
_BitInt(127) neg(_BitInt(127) a) { return -a; }
int f(int t) { return (_BitInt(96))(unsigned _BitInt(65))neg(t) / 2; }
$ gcc -m32 -O1 -c t1.c
t1.c: In function 'f':
t1.c:2:5: error: definition in block 21 does not dominate use in block 15
2 | int f(int t) { return (_BitInt(96))(unsigned _BitInt(65))neg(t) / 2; }
| ^
for SSA_NAME: _21 in statement:
_20 = PHI <0(2), _21(15)>
PHI argument
_21
for PHI node
_20 = PHI <0(2), _21(15)>
during GIMPLE pass: bitintlower
t1.c:2:5: internal compiler error: verify_ssa failed
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.
x86_64 trunk (842e09f0) -m32 ICE
x86_64 16.2.0 -m32 ICE
x86_64 15.3.0 -m32 ICE
x86_64 14.4.0 -m32 ICE at -O2 (-O1 compiles)
arm trunk (842e09f0) ICE
arm 16.2.0 ICE
-O1 and up ICE; -O0 compiles. x86_64 without -m32, and riscv64 compile it.