Bug 3633 – Optimizer causes access violation

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2009-12-18T17:09:00Z
Last change time
2014-03-01T00:36:29Z
Keywords
wrong-code
Assigned to
nobody
Creator
janzert

Comments

Comment #0 by janzert — 2009-12-18T17:09:02Z
The following throws an Access Violation exception under windows when compiled with dmd -release -O int get_value() { return 1; } int[2] array1; int[2] array2; int test(ulong a1, ulong extra, ulong extra2, ulong extra3) { if (!((a1 & 1) | (get_value() | array1[a1^1]))) return 0; if (0 >= array2[a1^1]) return 0; return 1; } void main(char[][] args) { test(0, 0, 0, 0); } Tested with dmd 1.033, 1.041, 1.043, 1.053
Comment #1 by bugzilla — 2009-12-24T12:16:22Z
changeset 308
Comment #2 by leandro.lucarella — 2009-12-25T10:00:38Z
Comment #3 by bugzilla — 2009-12-31T11:17:47Z
Fixed dmd 1.054 and 2.038
Comment #4 by janzert — 2010-01-05T14:14:12Z
Thanks for the quick fix.