Retro68/gcc/libphobos/testsuite/libphobos.allocations/overflow_from_existing.d

9 lines
218 B
D
Raw Normal View History

2019-06-02 15:48:37 +00:00
// { 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;
}