1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// { dg-shouldfail "Invalid memory operation" } // { dg-output "core.exception.InvalidMemoryOperationError@.*: Invalid memory operation" } struct S { ~this() { new int; } } void main() { foreach(i; 0 .. 100) new S; }