[Bug c++/111242] Out of bounds pointer arithmetic not caught in constexpr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111242 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2023-08-30 Ever confirmed|0
[Bug c++/111242] Out of bounds pointer arithmetic not caught in constexpr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111242 --- Comment #1 from Andrew Pinski --- Confirmed reduced testcase: ``` #define size 3 constexpr auto tester() { int *v = new int[size]; auto p = &v[size+1]; bool t = &v[0] == p; delete[] v; return t; } static_assert(!tester()); #if 0