// { dg-options "-std=gnu++20" } // { dg-do compile { target c++20 } } // PR libstdc++/105957 #include consteval bool test_pr105957() { std::allocator a; auto n = std::size_t(-1) / (sizeof(long long) - 1); auto p = a.allocate(n); // { dg-error "constexpr" } a.deallocate(p, n); return true; } static_assert( test_pr105957() ); // { dg-error "throw_bad_array_new_length" "" { target *-*-* } 0 }