[Issue 11237] zero initializer emitted to read-only data segment, slow compilation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 31 18:39:44 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11237


Martin Nowak <code at dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


--- Comment #6 from Martin Nowak <code at dawg.eu> 2013-10-31 18:39:41 PDT ---
The broke struct initializers.
They are emitted to object files with a symbol size of 1 byte regardless of
their actual size.
Also I wonder why the initializer are now common symbols ('V') while they
previously were normal uninitialized variables ('B').

Test case

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

dmd2.063.2 -c bug
nm -S bug.o
0000000000000000 0000000000010000 B _D4bug26Buffer6__initZ

// 1-byte size and weak object
dmd2.064 -c bug
nm -S bug.o
0000000000000000 0000000000000001 V _D4bug26Buffer6__initZ

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list