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
Comment #1 by schveiguy — 2008-07-16T15:55:03Z
Created attachment 262
Path.d file
Compile this file with -c -inline -O
Comment #2 by schveiguy — 2008-07-16T15:55:46Z
Created attachment 263
main program
compile this with Path.obj using dmd testpath.d Path.obj