June 16, 2012
This code:

auto dFiles = dirEntries("testimages/","*.png",SpanMode.shallow);
foreach(d; dFiles)
  writeln(d.name);

fails to generate a directory listing when I compile with -inline option to DMD v2.058. It works fine otherwise, both release and debug, with or without -O etc.

Is this a bug, or am I doing something dumb by using -inline?

Thanks,
cal
June 16, 2012
On Saturday, June 16, 2012 09:41:44 cal wrote:
> This code:
> 
> auto dFiles = dirEntries("testimages/","*.png",SpanMode.shallow);
> foreach(d; dFiles)
>    writeln(d.name);
> 
> fails to generate a directory listing when I compile with -inline option to DMD v2.058. It works fine otherwise, both release and debug, with or without -O etc.
> 
> Is this a bug, or am I doing something dumb by using -inline?

-inline should never affect the semantics of code. It can affect performance, but that should be it. So, if you're getting different behavior which is not related to performance or timing, it's a bug.

Try it with the latest dmd (2.059), and if it still occurs, please report it:

http://d.puremagic.com/issues

- Jonathan M Davis