https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110971
Bug ID: 110971 Summary: ICE on valid code at -O3 on x86_64-linux-gnu: in operator/, at sreal.cc:261 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/een8566xd [532] % 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 --enable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.0.0 20230810 (experimental) (GCC) [533] % [533] % gcctk -O3 small.c during GIMPLE pass: lsplit small.c: In function ‘main’: small.c:2:5: internal compiler error: in operator/, at sreal.cc:261 2 | int main() { | ^~~~ 0x7e52f5 sreal::operator/(sreal const&) const ../../gcc-trunk/gcc/sreal.cc:261 0x7e52f5 sreal::operator/(sreal const&) const ../../gcc-trunk/gcc/sreal.cc:259 0x118e47b split_loop ../../gcc-trunk/gcc/tree-ssa-loop-split.cc:719 0x118ed4b tree_ssa_split_loops ../../gcc-trunk/gcc/tree-ssa-loop-split.cc:1769 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. [534] % [534] % cat small.c int a, b, c, d; int main() { for (a = 0; a < 2; a++) { if (b > 2) c = 0; if (b > a) d = 0; } return 0; }