This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Implement Fortran 2018's RANDOM_INIT
- From: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 1 Jun 2018 09:50:06 +0300
- Subject: Re: [PATCH] Implement Fortran 2018's RANDOM_INIT
- References: <20180528170634.GA76076@troutmask.apl.washington.edu>
On Mon, May 28, 2018 at 8:06 PM, Steve Kargl <
sgk@troutmask.apl.washington.edu> wrote:
> The attached patch implements the RANDOM_INIT intrinsic
> subroutine specified in Fortran 2018. I have had this
> patch in my local tree for the last 5+ months. Now that
> 8.1 is out, it is time to submit it. It has been built
> and regression tested on x86_64-*-freebsd. OK to commit?
>
> Note, I have only tested with -fcoarray=single as I don't
> have OpenCoarray set up to build with trunk. Testing with
> OpenCoarray is encouraged.
>
> 2018-05-28 Steven G. Kargl <kargl@gcc.gnu.org>
>
> * check.c (gfc_check_random_init): New function. Check arguments of
> RANDOM_INIT.
> * gfortran.h (GFC_ISYM_RANDOM_INIT): New enum token.
> * intrinsic.c (add_subroutines): Add RANDOM_INIT to list of
> subroutines.
> * intrinsic.h: Add prototypes for gfc_check_random_init and
> gfc_resolve_random_init
> * intrinsic.texi: Document new intrinsic subprogram.
> * iresolve.c (gfc_resolve_random_init): Resolve routine name.
> * trans-decl.c: Declare gfor_fndecl_random_init
> * trans-intrinsic.c (conv_intrinsic_random_init): New function.
> Translate call to RANDOM_INIT.
> (gfc_conv_intrinsic_subroutine): Call it.
> * trans.h: Declare gfor_fndecl_random_init
>
> 2018-05-28 Steven G. Kargl <kargl@gcc.gnu.org>
>
> * gfortran.dg/random_init_1.f90: New test.
> * gfortran.dg/random_init_2.f90: New test.
> * gfortran.dg/random_init_3.f90: New test.
> * gfortran.dg/random_init_4.f90: New test.
> * gfortran.dg/random_init_5.f90: New test.
> * gfortran.dg/random_init_6.f90: New test.
>
> 2018-05-28 Steven G. Kargl <kargl@gcc.gnu.org>
>
> * libgfortran/Makefile.am: Add random_init.f90 to build.
> * libgfortran/Makefile.in: Regenerated.
> * libgfortran/gfortran.map: Expose symbol for
> _gfortran_random_init.
> * libgfortran/intrinsics/random_init.f90: Implementation.
>
> --
> Steve
>
Looks good, thanks for the patch!
--
Janne Blomqvist