https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122296
Bug ID: 122296
Summary: ICE on valid code at -O1 on x86_64-linux-gnu:
verify_gimple failed
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: zhendong.su at inf dot ethz.ch
Target Milestone: ---
Compiler Explorer: https://godbolt.org/z/Tzn7fb3de
Note:
- fails: trunk
- works: 15.2 and earlier
[528] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/home/suz/suz-local/software/local/gcc-trunk/bin/../libexec/gcc/x86_64-pc-linux-gnu/16.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--enable-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk
--enable-sanitizers --enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 16.0.0 20251015 (experimental) (GCC)
[529] %
[529] % gcctk -O1 small.c
small.c: In function ‘main’:
small.c:2:5: error: mismatching comparison operand types
2 | int main() {
| ^~~~
unsigned int
int
_11 = _5 != 0;
during GIMPLE pass: forwprop
small.c:2:5: internal compiler error: verify_gimple failed
0x257e47b internal_error(char const*, ...)
../../gcc-trunk/gcc/diagnostic-global-context.cc:787
0x120cdfe verify_gimple_in_cfg(function*, bool, bool)
../../gcc-trunk/gcc/tree-cfg.cc:5599
0x107f97a execute_function_todo
../../gcc-trunk/gcc/passes.cc:2097
0x107fe4b execute_todo
../../gcc-trunk/gcc/passes.cc:2149
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.
[530] %
[530] % cat small.c
unsigned a;
int main() {
short c = a;
a = a | c || c - a;
return 0;
}