Boost logo

Boost :

Subject: Re: [boost] Boost Trac, random, No-Maintainer?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2017-10-10 17:50:21


AMDG

On 10/08/2017 09:47 AM, Peter Dimov via Boost wrote:
>
> I also see (unrelated) variant=release errors on msvc-12.0/msvc-14.0,
> but haven't investigated them.
>
> ...failed testing.capture-output
> ..\..\bin.v2\libs\random\test\test_knuth_b.test\msvc-12.0\release\threadapi-win32\threading-multi\test_knuth_b.run...
>
> ...failed testing.capture-output
> ..\..\bin.v2\libs\random\test\test_ecuyer1988.test\msvc-12.0\release\threadapi-win32\threading-multi\test_ecuyer1988.run...
>
> ...failed testing.capture-output
> ..\..\bin.v2\libs\random\test\test_independent_bits31.test\msvc-12.0\release\threadapi-win32\threading-multi\test_independent_bits31.run...
>

This appears to be a compiler bug.

  These three generators are all random engine adaptors
applied to a linear_congruential_engine. At
boost/random/linear_congruential.hpp:140

        if(increment == 0 && _x == 0) {
            _x = 1;
        }

  The compiler is generating a `cmove` but drops the
corresponding `test`. I'm unable to spot any undefined
behavior in the code (it still appears if there are no
conversions and all the types involved are `unsigned int`),
but even if there were a problem, this codegen can't
possibly make sense.

In Christ,
Steven Watanabe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk