This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, libfortran] Multi-threaded random_number
- From: Andreas Schwab <schwab at suse dot de>
- To: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 01 Aug 2016 12:48:43 +0200
- Subject: Re: [Patch, libfortran] Multi-threaded random_number
- Authentication-results: sourceware.org; auth=none
- References: <CAO9iq9FeBPjnwMJScLzhyXANkc=z=0AybdW2dNA0z5FcsMsTGw@mail.gmail.com> <CAO9iq9FPy7sTerw2RoHWTCFNgrWFRAz8R+GKvSBHNE67B=myEA@mail.gmail.com>
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.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."