Bug 20649 – Trait isZeroInit gives false in certain scenarios

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-03-09T09:03:06Z
Last change time
2020-03-21T03:56:39Z
Keywords
ice, pull
Assigned to
No Owner
Creator
godmyoh

Comments

Comment #0 by menodinulla — 2020-03-09T09:03:06Z
The following code causes `object.Error@(0): Access Violation` at `ss.length = 1` on Windows 64bit. --- app.d import std.traits; struct S { int i; } auto f() { S[] ss; ss.length = 1; } alias a = ReturnType!f; void main() { f(); } --- Tested on the following versions. - dmd-2.090.0 - dmd-2.091.0-rc.1
Comment #1 by b2.temp — 2020-03-09T09:24:42Z
according to run.dlang.io it's a regression in 2.087 or 2.087.1
Comment #2 by b2.temp — 2020-03-09T09:25:54Z
sorry, the reg is from 2.088 and 2.087.1 is the last working.
Comment #3 by dlang-bot — 2020-03-09T16:28:36Z
@BorisCarvajal created dlang/dmd pull request #10881 "Fix Issue 20649 - Trait isZeroInit gives false in certain scenarios" fixing this issue: - Fix Issue 20649 - Trait isZeroInit gives false in certain scenarios https://github.com/dlang/dmd/pull/10881
Comment #4 by dlang-bot — 2020-03-10T00:13:49Z
dlang/dmd pull request #10881 "Fix Issue 20649 - Trait isZeroInit gives false in certain scenarios" was merged into stable: - 7ed52727aa50a021795abc06f91592b0adcc9b13 by Boris Carvajal: Fix Issue 20649 - Trait isZeroInit gives false in certain scenarios https://github.com/dlang/dmd/pull/10881