Bug 19224 – core.simd __vector.array "__r2.length cannot be evaluated at compile time"

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-09-05T14:07:42Z
Last change time
2019-03-12T19:52:27Z
Keywords
pull
Assigned to
No Owner
Creator
Nathan S.
See also
https://issues.dlang.org/show_bug.cgi?id=19223

Comments

Comment #0 by n8sh.secondary — 2018-09-05T14:07:42Z
This may be related to issue #19223 but it might also be a distinct bug. Example non-compiling code: https://run.dlang.io/is/zJJlZl --- float sum(const float[4] val) { float sum = 0; foreach (x; val) sum += x; return sum; } void main() { import core.simd : float4; enum x = sum(float4.init.array); } --- Error message: """ Error: __r2.length cannot be evaluated at compile time" onlineapp.d(11): called from here: sum(cast(__vector(float[4]))[nanF, nanF, nanF, nanF]) """
Comment #1 by dlang-bot — 2019-03-10T13:32:16Z
@ibuclaw created dlang/dmd pull request #9438 "[dmd-cxx] Backport vector array fixes from master" fixing this issue: - fix Issue 19224 - Error: __r2.length cannot be evaluated at compile time https://github.com/dlang/dmd/pull/9438
Comment #2 by dlang-bot — 2019-03-12T19:52:27Z
dlang/dmd pull request #9438 "[dmd-cxx] Backport vector array fixes from master" was merged into dmd-cxx: - 7d3e991e8400e5d92451df931e6835f446aabf83 by Iain Buclaw: fix Issue 19224 - Error: __r2.length cannot be evaluated at compile time https://github.com/dlang/dmd/pull/9438