Bug 4189 – Bus errors with array operations

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2010-05-14T18:35:00Z
Last change time
2015-06-09T05:13:50Z
Keywords
wrong-code
Assigned to
nobody
Creator
pillsbury+dbugs

Comments

Comment #0 by pillsbury+dbugs — 2010-05-14T18:35:49Z
Using an arithmetic operations on arrays causes bus errors when compiling with DMD 2.046 on Mac OS 10.6.3. void main () { auto vec = new double[10]; foreach(i, ref x; vec) { x = cast(double) i; } vec[] *= 0.5; } This compiles with no errors or warnings, and a bus error results when the resulting binary is executed.
Comment #1 by clugdbug — 2010-06-09T11:50:32Z
*** This issue has been marked as a duplicate of issue 3658 ***