https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115590
--- Comment #3 from nrk at disroot dot org --- > I am not 100% sure want to keep these around even at -O0 since they don't > have any behavior effect. I'd strongly argue that if you're using sanitizers, you'd want these to be caught :) Also worth noting that bad array deref gets caught even if they don't have any effect: [/tmp]~> cat test.c int main(void) { int v[1]; v[1]; return 0; } [/tmp]~> gcc -fsanitize=address,undefined -O0 -o test ./test.c && ./test test.c:4:3: runtime error: index 1 out of bounds for type 'int [1]'