http://d.puremagic.com/issues/show_bug.cgi?id=7439
Summary: Compound assignment causes segmentation fault Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: critical Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: iteronve...@gmail.com --- Comment #0 from iteronve...@gmail.com 2012-02-04 14:47:00 PST --- Tested on Gnu/Linux, 64-bit, DMD-2.057 --------------------------8<----------------------------8<-------------------------------------- struct A(int r, int c){ public: alias r R; alias c C; alias float[R * C] Data; Data _data; alias _data this; this(Data ar){ _data = ar; } pure ref float opIndex(size_t rr, size_t cc){ return _data[cc + rr * C]; } } void main(){ A!(2, 2) a = A!(2, 2)([8, 3, 2, 9]); a[0,0] -= a[0,0] * 2.0; } -------------------------->8---------------------------->8-------------------------------------- workaround: avoid compound assignment operators. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------