https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99418
--- Comment #1 from Ivan Sorokin <vanyacpp at gmail dot com> ---
Here is the reduced example. It doesn't SIGSEGV, but it doesn't report any
sanitizer errors either:
$ g++ -g -fsanitize=bounds 3.cpp
$ cat 3.cpp
#include <cstddef>
void escape(int& a)
{}
void test(size_t n, size_t m)
{
int mas[n][m];
escape(mas[n - 1][m]);
}
int main()
{
test(4, 3);
}
Surprisingly if I replace taking a reference with writing to the array it will
show an error.
