aboutsummaryrefslogtreecommitdiff
path: root/libphobos/testsuite/libphobos.allocations/overflow_from_zero.d
blob: de48773272b9dc011e003d52bd4e8a3150b13823 (plain)
1
2
3
4
5
6
7
8
// { dg-shouldfail "Memory allocation failed" }
// { dg-output "core.exception.OutOfMemoryError@.*: Memory allocation failed" }
void main()
{
    void[] buffer;
    buffer.length = 0;
    buffer.length = size_t.max;
}