June 01, 2011 [Issue 6086] New: Possibly unneded functions | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=6086 Summary: Possibly unneded functions Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: minor Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@eml.cc 2011-06-01 05:22:29 PDT --- This is not a true bug, and I am not sure if this is right. This 2 lines long D2 program: void foo()() {} void main() {} Once compiled with DMD 2.053 (using no compiler switch, or using -O -release -inline is the same), generates this asm too: _D4test7__arrayZ comdat L0: enter 4,0 push EAX mov ECX,offset FLAT:_D4test12__ModuleInfoZ push ECX call near ptr __d_array_bounds _D4test8__assertFiZv comdat L0: enter 4,0 push EAX mov ECX,offset FLAT:_D4test12__ModuleInfoZ push ECX call near ptr __d_assertm _D4test15__unittest_failFiZv comdat L0: enter 4,0 push EAX mov ECX,offset FLAT:_D4test12__ModuleInfoZ push ECX call near ptr __d_unittestm add ESP,8 leave ret Is unittest_fail needed in the asm of this program? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 02, 2011 [Issue 6086] Possibly unneded functions | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=6086 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla@digitalmars.com Resolution| |INVALID --- Comment #1 from Walter Bright <bugzilla@digitalmars.com> 2011-06-01 18:05:29 PDT --- Compile with: dmd -O -release -map Examine the map file. Note that the "unneeded" functions are not there. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation