aboutsummaryrefslogtreecommitdiff
path: root/libphobos/testsuite/libphobos.allocations/overflow_from_existing.d
blob: c41b29fbde76b461c45c7aa7a80c20d07a383585 (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 = 1;
    buffer.length = size_t.max;
}