xref: /netbsd-src/external/gpl3/gcc/dist/libphobos/testsuite/libphobos.allocations/overflow_from_existing.d (revision 9fd8799cb5ceb66c69f2eb1a6d26a1d587ba1f1e)
1 // { dg-shouldfail "Memory allocation failed" }
2 // { dg-output "core.exception.OutOfMemoryError@.*: Memory allocation failed" }
3 void main()
4 {
5     void[] buffer;
6     buffer.length = 1;
7     buffer.length = size_t.max;
8 }
9