struct A { ~this() { } } long[1] foo() { A a; return [1]; } void main() { assert( foo() == [1] ); } work for all static arrays with size == 8 bytes (int[2], float[2], ubyte[8], etc) only on debug mode assert fails dmd --version DMD64 D Compiler v2.071.0 Copyright (c) 1999-2015 by Digital Mars written by Walter Bright
Assert does not fail with dmd 2.069 or earlier. Marking as regression.
May be related to https://issues.dlang.org/show_bug.cgi?id=16699
https://github.com/dlang/dmd/pull/6263
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/6bff4520cc77b682948db87026bfcea1cf150cb2 add test case for issue 16102 fixes issue 16102 https://github.com/dlang/dmd/commit/fd9eed45d0ce5c1e86a2e0f6c4148f982d66aa9c Merge pull request #6263 from aG0aep6G/16102 Fix issue 16102 - [REG2.070] struct dtor replace value on stack
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/6bff4520cc77b682948db87026bfcea1cf150cb2 add test case for issue 16102 https://github.com/dlang/dmd/commit/fd9eed45d0ce5c1e86a2e0f6c4148f982d66aa9c Merge pull request #6263 from aG0aep6G/16102
Commits pushed to scope at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/6bff4520cc77b682948db87026bfcea1cf150cb2 add test case for issue 16102 https://github.com/dlang/dmd/commit/fd9eed45d0ce5c1e86a2e0f6c4148f982d66aa9c Merge pull request #6263 from aG0aep6G/16102
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/6bff4520cc77b682948db87026bfcea1cf150cb2 add test case for issue 16102 https://github.com/dlang/dmd/commit/fd9eed45d0ce5c1e86a2e0f6c4148f982d66aa9c Merge pull request #6263 from aG0aep6G/16102