https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107798
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- With -fsanitize=undefined we do detect the original undefined behavior at runtime: /app/example.cpp:21:50: runtime error: index 3 out of bounds for type 'A [3]'