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