one of the weirdest bugs ever - request for testing
Andrew Edwards via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Jun 12 12:30:07 PDT 2014
On 6/12/14, 3:20 PM, captaindet wrote:
> import std.stdio;
> import std.algorithm;
> import std.file; // not needed, but if imported, causing trouble, see
> below
>
> void main()
> {
> auto names = ["one","FOO","two","three"];
>
> // wrong code gen(*) with -release -O -inline -noboundscheck or
> // with -release -inline -noboundscheck but only if std.file is imported:
>
> auto x = countUntil( names, "FOO" );
> write(x);
> if( 0 <= x ) writeln(" found a FOO"); // (*) not found!
> }
I'm running OSX Mavericks with DMD v2.065.0. This behavior cannot be
reproduced.
More information about the Digitalmars-d-learn
mailing list