[Patch, libfortran] Multi-threaded random_number
Janne Blomqvist
blomqvist.janne@gmail.com
Mon Aug 1 11:00:00 GMT 2016
On Mon, Aug 1, 2016 at 1:48 PM, Andreas Schwab <schwab@suse.de> wrote:
> On Mo, Aug 01 2016, Janne Blomqvist <blomqvist.janne@gmail.com> wrote:
>
>> PING?
>>
>> Also, a minor bugfix on top of the previous patch:
>>
>> diff --git a/libgfortran/intrinsics/random.c b/libgfortran/intrinsics/random.c
>> index 9b54a02..21395ea 100644
>> --- a/libgfortran/intrinsics/random.c
>> +++ b/libgfortran/intrinsics/random.c
>> @@ -787,7 +787,7 @@ random_seed_i4 (GFC_INTEGER_4 *size, gfc_array_i4
>> *put, gfc_array_i4 *get)
>> init_rand_state (true);
>>
>> /* Copy p & 15 */
>> - rand_state.p = put->base_addr[SZ * GFC_DESCRIPTOR_STRIDE(put, 0)] & 15;
>> + rand_state.p = put->base_addr[SZ * GFC_DESCRIPTOR_STRIDE(put, 0)] % 15;
>
> The comment no longer fits.
Indeed, thanks. I've fixed it in my own tree.
--
Janne Blomqvist
More information about the Fortran
mailing list