| 1 |
// REQUIRED_ARGS: -preview=dip1021 -lowmem |
| 2 |
// https://issues.dlang.org/show_bug.cgi?id=23978 |
| 3 |
|
| 4 |
// Note: this is a memory corruption bug. |
| 5 |
// Memory returned by `GC.realloc` retains references to old memory in it, |
| 6 |
// mostly because of the smallarray optimization for `Array(T)`. |
| 7 |
// If this fails again, it might not be consistent, so try running it multiple times. |
| 8 |
|
| 9 |
class LUBench { } |
| 10 |
void lup(ulong , ulong , int , int = 1) |
| 11 |
{ |
| 12 |
new LUBench; |
| 13 |
} |
| 14 |
void lup_3200(ulong iters, ulong flops) |
| 15 |
{ |
| 16 |
lup(iters, flops, 3200); |
| 17 |
} |
| 18 |
void raytrace() |
| 19 |
{ |
| 20 |
struct V |
| 21 |
{ |
| 22 |
float x, y, z; |
| 23 |
auto normalize() { } |
| 24 |
struct Tid { } |
| 25 |
auto spawnLinked() { } |
| 26 |
string[] namesByTid; |
| 27 |
class MessageBox { } |
| 28 |
auto cross() { } |
| 29 |
} |
| 30 |
} |