xref: /netbsd-src/external/gpl3/gcc/dist/libphobos/testsuite/libphobos.allocations/overflow_from_existing.d (revision 73d56d5b0be8704e4f0a7e8221a2c7309572c9a1)
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