digitalmars.D.bugs - [Issue 2232] New: DMD generates invalid code when an object file is compiled -inline
- d-bugmail puremagic.com (28/28) Jul 16 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2232
- d-bugmail puremagic.com (7/7) Jul 16 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2232
- d-bugmail puremagic.com (7/7) Jul 16 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2232
- d-bugmail puremagic.com (9/9) Sep 02 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2232
http://d.puremagic.com/issues/show_bug.cgi?id=2232 Summary: DMD generates invalid code when an object file is compiled -inline Product: D Version: 1.033 Platform: PC OS/Version: Windows Status: NEW Keywords: wrong-code Severity: major Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: schveiguy yahoo.com The attached files when compiled in this manner: dmd -c -O -inline Path.d dmd testpath.d Path.obj Will yield an executable that corrupts the return value from the 'modified', 'accessed', and 'created' functions. I'm also printing out the values when they are read from the OS as a comparison. If the Path object file is compiled without -inline, it works. If you compile Path and testpath all at once with -inline, it works. If you change e.g. created() to use a temporary variable to store the return value, it works. This is the most minimal example I could create, it happens with both Phobos and Tango, this example is for Phobos. The code comes from tango.io.Path.d --
Jul 16 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2232 Created an attachment (id=262) --> (http://d.puremagic.com/issues/attachment.cgi?id=262&action=view) Path.d file Compile this file with -c -inline -O --
Jul 16 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2232 Created an attachment (id=263) --> (http://d.puremagic.com/issues/attachment.cgi?id=263&action=view) main program compile this with Path.obj using dmd testpath.d Path.obj --
Jul 16 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2232 bugzilla digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Fixed dmd 1.035 and 2.019 --
Sep 02 2008