https://issues.dlang.org/show_bug.cgi?id=17448 --- Comment #6 from b2.temp at gmx.com --- It looks like a bad codegen and not a @safe issue. `ulong[20] tmp;` is not corrupted if i compile and run your example with LDC2. --