https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107302
Bug ID: 107302 Summary: [13 Regression] ICE in as_a, at is-a.h:242 since r13-3327-g46a8e017d048ec32 Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: rguenth at gcc dot gnu.org Target Milestone: --- The following crashes: $ cat tsvc.i int a[0]; int s292_im1; void s292() { for (int i = 0; i < 2000; i++) { a[i] = s292_im1; s292_im1 = i; } } $ gcc tsvc.i -fno-tree-pre -O2 during GIMPLE pass: vect tsvc.i: In function ‘s292’: tsvc.i:5:1: internal compiler error: in as_a, at is-a.h:242 5 | s292() { | ^~~~ 0x7fa8a6 gimple_statement_with_memory_ops* as_a<gimple_statement_with_memory_ops*, gimple>(gimple*) /home/marxin/Programming/gcc/gcc/is-a.h:242 0x7fde52 gphi* as_a<gphi*, gimple>(gimple*) /home/marxin/Programming/gcc/gcc/gimple-iterator.h:129 0x7fde52 gphi_iterator::phi() const /home/marxin/Programming/gcc/gcc/gimple-iterator.h:43 0x7fde52 vect_transform_loop(_loop_vec_info*, gimple*) /home/marxin/Programming/gcc/gcc/tree-vect-loop.cc:10894 0x124f32e vect_transform_loops /home/marxin/Programming/gcc/gcc/tree-vectorizer.cc:1007 0x124f90f try_vectorize_loop_1 /home/marxin/Programming/gcc/gcc/tree-vectorizer.cc:1153 0x124f90f try_vectorize_loop /home/marxin/Programming/gcc/gcc/tree-vectorizer.cc:1183 0x124fca4 execute /home/marxin/Programming/gcc/gcc/tree-vectorizer.cc:1299 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.