https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110116
Bug ID: 110116 Summary: ICE on valid code at -O3 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: --- It appears to be a recent regression. Compiler Explorer: https://godbolt.org/z/MTsfTocn7 [635] % 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/14.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 --disable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.0.0 20230604 (experimental) [master r14-924-gd709841ae0f] (GCC) [636] % [636] % gcctk -O3 small.c small.c: In function ‘main’: small.c:6:21: warning: iteration 2147483646 invokes undefined behavior [-Waggressive-loop-optimizations] 6 | for (b = 1; b; b++) | ~^~ small.c:6:17: note: within this loop 6 | for (b = 1; b; b++) | ^ small.c:4:5: error: type mismatch in binary expression 4 | int main() { | ^~~~ vector(4) char vector(4) char vector(4) unsigned char _73 = vect__48.34_68 & vect__6.22_19; during GIMPLE pass: reassoc small.c:4:5: internal compiler error: verify_gimple failed 0x100327e verify_gimple_in_cfg(function*, bool, bool) ../../gcc-trunk/gcc/tree-cfg.cc:5652 0xe98674 execute_function_todo ../../gcc-trunk/gcc/passes.cc:2098 0xe98bcb execute_todo ../../gcc-trunk/gcc/passes.cc:2152 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. [637] % [637] % cat small.c unsigned char a[5]; int b, d; char c; int main() { if (d) { for (b = 1; b; b++) c &= d = 1; for (; d < 5; d++) c &= a[d]; } return 0; }