[Issue 21763] New: Zeroed static array is not placed in BSS with -g build option

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 25 00:02:30 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=21763

          Issue ID: 21763
           Summary: Zeroed static array is not placed in BSS with -g build
                    option
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ryuukk.dev at gmail.com

The following code:

```
__gshared ubyte[0x1000000 - 1] BUFFER = 0;
void main() {}
```

When compiled with: dmd -g -m64

Will produce an exe of size: 21_378_560 bytes

Without -g, it'll produce an exe of size: 415_744 bytes

It only happen on windows, only with DMD, only with that -g option

--


More information about the Digitalmars-d-bugs mailing list