https://issues.dlang.org/show_bug.cgi?id=16102
Issue ID: 16102
Summary: struct dtor replace value on stack
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: major
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
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
--