xref: /netbsd-src/external/gpl3/gcc.old/dist/libphobos/testsuite/libphobos.allocations/overflow_from_zero.d (revision c42dbd0ed2e61fe6eda8590caa852ccf34719964)
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 = 0;
7     buffer.length = size_t.max;
8 }
9