https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118895
Bug ID: 118895 Summary: ICE: during GIMPLE pass: pre Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: yunboni at smail dot nju.edu.cn Target Milestone: --- This code crashes at -O2: ```c unsigned long a; void fn1() { unsigned long e = a; int c = e; int d = c < 100 ? c : 0; if (d + (int)e & 608) while (e & 608) e <<= 1; } ``` Compiler Explorer: https://godbolt.org/z/qvvhh5M5j Crash: during GIMPLE pass: pre Backtrace: simple.c: In function ‘b’: simple.c:2:6: internal compiler error: Segmentation fault 2 | void b() { | ^ 0x260a386 internal_error(char const*, ...) ../../gcc/diagnostic-global-context.cc:517 0x1143f13 crash_signal ../../gcc/toplev.cc:322 0x1345424 bmp_iter_set_init(bitmap_iterator*, bitmap_head const*, unsigned int, unsigned int*) ../../gcc/bitmap.h:542 0x1345424 find_or_generate_expression ../../gcc/tree-ssa-pre.cc:2776 0x1344a3a find_or_generate_expression ../../gcc/tree-ssa-pre.cc:2748 0x1344a3a create_expression_by_pieces ../../gcc/tree-ssa-pre.cc:2924 0x1349943 insert_into_preds_of_block ../../gcc/tree-ssa-pre.cc:3132 0x134c360 do_pre_regular_insertion ../../gcc/tree-ssa-pre.cc:3398 0x134c360 insert ../../gcc/tree-ssa-pre.cc:3833 0x134c360 execute ../../gcc/tree-ssa-pre.cc:4470