www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15130] New: dmd emits huge data for zero initialized struct


          Issue ID: 15130
           Summary: dmd emits huge data for zero initialized struct
           Product: D
           Version: D2
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: code dawg.eu

cat > bug.d << CODE
struct Buffer
    ubyte[64*1024] bytes;

dmd -c bug
nm -S bug.o
0000000000000000 0000000000000088 V _D21TypeInfo_S3bug6Buffer6__initZ
0000000000000010 000000000000000c R _D3bug12__ModuleInfoZ
0000000000000000 0000000000010000 B _D3bug6Buffer6__initZ

The _D3bug6Buffer6__initZ is referenced by the typeinfo, but it should be a
null array in the typeinfo instead.

Sep 30 2015