Bug 16102 – [REG2.070] struct dtor replace value on stack
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-05-30T19:21:00Z
Last change time
2017-01-16T23:25:04Z
Keywords
wrong-code
Assigned to
nobody
Creator
code.viator
Comments
Comment #0 by code.viator — 2016-05-30T19:21:19Z
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
Comment #1 by ag0aep6g — 2016-05-30T19:40:47Z
Assert does not fail with dmd 2.069 or earlier. Marking as regression.