[PATCH] Implement Fortran 2018's RANDOM_INIT
Steve Kargl
sgk@troutmask.apl.washington.edu
Mon May 28 18:13:00 GMT 2018
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: z_random_init.diff
Type: text/x-diff
Size: 24342 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180528/c227f339/attachment.bin>
More information about the Gcc-patches
mailing list