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.
Comment #2 by hsteoh — 2016-11-17T19:38:37Z
Comment #3 by public — 2016-11-20T00:39:23Z
Comment #4 by github-bugzilla — 2016-11-20T01:26:18Z
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
Comment #5 by github-bugzilla — 2016-12-18T22:53:14Z
Comment #6 by github-bugzilla — 2016-12-27T14:41:11Z
Comment #7 by github-bugzilla — 2017-01-16T23:25:04Z