Bug 1284 – CodeView: wrong CV array size for multi-dimensional static arrays

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-06-22T13:17:00Z
Last change time
2014-02-16T15:23:35Z
Assigned to
bugzilla
Creator
jascha

Comments

Comment #0 by jascha — 2007-06-22T13:17:06Z
module main; uint[8][7] arr1; // will be uint[8][7] uint[8][8] arr2; // will be uint[8][0] uint[8][9] arr3; // will be uint[8][1] void main() { }
Comment #1 by bugzilla — 2007-06-22T15:35:01Z
The debug info looks like: -------------------------------- $$SYMBOLS segment S_COMPILE 06 x008000 Z8.50.3 S_GDATA32 off = x0000, seg = x0000, typ = x1002 _D4test4arr1G7G8k segidx = 5 offset = 0018, lcfd = ec10, fd = 1, td = 4, targdisp = x0000 S_GDATA32 off = x00e0, seg = x0000, typ = x1003 _D4test4arr2G8G8k segidx = 5 offset = 0036, lcfd = ec10, fd = 1, td = 4, targdisp = x0000 S_GDATA32 off = x01e0, seg = x0000, typ = x1004 _D4test4arr3G9G8k segidx = 5 offset = 0054, lcfd = ec10, fd = 1, td = 4, targdisp = x0000 $$SYMBOLS ends $$TYPES segment 00: LF_ARGLIST argcount=0 01: LF_ARRAY <typidx 0075> <typidx 0012> 20 00 00 02: LF_ARRAY <typidx 1001> <typidx 0012> e0 00 00 03: LF_ARRAY <typidx 1001> <typidx 0012> 00 01 00 04: LF_ARRAY <typidx 1001> <typidx 0012> 20 01 00 $$TYPES ends ----------------- The sizes of the 3 arrays are 00E0, 0100, 0120, corresponding to 224, 256, and 288, which correspond to 4*8*7, 4*8*8, and 4*8*9, which looks correct to me.