Bug 746 – incorrect code generation for "new Type[][](1, 1)"

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2006-12-25T11:01:00Z
Last change time
2015-06-09T05:14:51Z
Assigned to
dvdfrdmn
Creator
thomas-dloop

Attachments

IDFilenameSummaryContent-TypeSize
88array_initialization_26_E.oAttached array_initialization_26_E.o generated by GDC-0.20 from http://dstress.kuehne.cn/run/a/array_initialization_26_E.dapplication/octet-stream1612

Comments

Comment #0 by thomas-dloop — 2006-12-25T11:01:26Z
incorrect code generation if compiled with "-O": # # void main(){ # int[][] a = new int [][](1, 1); # } # always incorrect code generation: # # void main(){ # float[][] a = new float [][](1, 1); # } # test cases: http://dstress.kuehne.cn/run/a/array_initialization_26_B.d http://dstress.kuehne.cn/run/a/array_initialization_26_C.d http://dstress.kuehne.cn/run/a/array_initialization_26_E.d
Comment #1 by bugzilla — 2007-01-02T00:24:51Z
It works when I try it, with and without -O. Also, the float array is (and should be) initialized to float.nan, not 0.
Comment #2 by thomas-dloop — 2007-01-02T09:17:55Z
Created attachment 88 Attached array_initialization_26_E.o generated by GDC-0.20 from http://dstress.kuehne.cn/run/a/array_initialization_26_E.d
Comment #3 by dvdfrdmn — 2007-03-10T10:27:06Z
Fixed in 0.23. The array_initialization_26_E case is invalid: (0.0 !<>= float.nan) should test as true.
Comment #4 by thomas-dloop — 2007-03-12T00:29:22Z
Thanks, Fixed