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