https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71916
--- Comment #10 from Martin Liška <marxin at gcc dot gnu.org> --- Couple of observations: 1) the second test-case triggers undefined behavior in: g[i] = 9; /home/marxin/Programming/testcases/pr71916-2-original.c:20:8: runtime error: index 4 out of bounds for type 'char [4]' /home/marxin/Programming/testcases/pr71916-2-original.c:20:12: runtime error: store to address 0xffe64530 with insufficient space for an object of type 'char' 2) cunrolli pass determines that following loop iterates 5 times (because of g[4] array): pr71916-2-original.c:11:6: note: loop with 5 iterations completely unrolled Latch of last iteration was marked by __builtin_unreachable (). 3) --dbg-cnt="registered_jump_thread:4" is the first jump threading which triggers the ICE. It adds jump to the BB with __builtin_unreachable.