www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15006] New: Compiling trivial program produces 400,000+ byte


          Issue ID: 15006
           Summary: Compiling trivial program produces 400,000+ byte
                    object file
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com

The following program:
extern(C) int printf(const char*, ...);

private import std.file;

alias std.file.getcwd getcwd;

void main()
     auto s = getcwd();
     printf("%.*s\n", s.length, s.ptr);
compiled with:

    dmd test -unittest

produces a 400,000+ byte object file, filled with a truly stunning quantity of
functions compiled in from most of Phobos.

Sep 03 2015