Array operations

Jonathan M Davis newsgroup.d at jmdavisprog.com
Sun May 4 00:15:23 UTC 2025


On Saturday, May 3, 2025 8:23:00 AM Mountain Daylight Time Andy Valencia via Digitalmars-d-learn wrote:
> At least on 1.40.1 of the ldc2 distro for x86-64, uses the
> "illegal instruction" instruction.

That sounds like an ldc bug then. With dmd, your program gives

[2, 2, 2, 2, 1, 1, 1, 1]
[2, 2, 2, 2, 1, 1, 1, 1]
core.exception.RangeError at q.d(13): Range violation
----------------
??:? onRangeError [0x29f6b6]
??:? _d_arrayboundsp [0x29f685]
??:? _Dmain [0x27c099]

- Jonathan M Davis






More information about the Digitalmars-d-learn mailing list