https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92718
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Started with r243419. evrp is computing strange ranges, [0, 1] rather than just [0, 0] for the iterator. It is true that &a[1] is still valid, but the memset with non-zero size at that spot or MEM[(struct s *)&a][i_2].x = 1; for i_2 equal to 1 is already UB. Later on cunroll completely unrolls the loop based on that, into two iterations, the first one contains both the memset and ps->x and the second one just memset (which is UB too) and ps->x already replaced by __builtin_unreachable. The warning is then during expansion of that second iteration.