re PR fortran/63570 ([F2018] Implement 13.7.137 RANDOM INIT (REPEATABLE, IMAGE DISTINCT))
authorSteven G. Kargl <kargl@gcc.gnu.org>
Fri, 1 Jun 2018 17:05:02 +0000 (17:05 +0000)
committerSteven G. Kargl <kargl@gcc.gnu.org>
Fri, 1 Jun 2018 17:05:02 +0000 (17:05 +0000)
commitddd3e26e42b8d55989f9964c6ec6ee50b30b1802
tree0bf61ebd5153e8a07d2e13d7f8dc20fc8dfbcfea
parent77b8fb05b3ae9223abb7bac05d8af6892cfa251a
re PR fortran/63570 ([F2018] Implement 13.7.137 RANDOM INIT (REPEATABLE, IMAGE DISTINCT))

2018-06-01  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/63570
* 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.
(gfc_check_intrinsic_standard): Introduce Fortran 2018 check.
* 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-06-01  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/63570
* 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-06-01  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/63570
* 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.

From-SVN: r261075
22 files changed:
gcc/fortran/ChangeLog
gcc/fortran/check.c
gcc/fortran/gfortran.h
gcc/fortran/intrinsic.c
gcc/fortran/intrinsic.h
gcc/fortran/intrinsic.texi
gcc/fortran/iresolve.c
gcc/fortran/trans-decl.c
gcc/fortran/trans-intrinsic.c
gcc/fortran/trans.h
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/random_init_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/random_init_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/random_init_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/random_init_4.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/random_init_5.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/random_init_6.f90 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/Makefile.am
libgfortran/Makefile.in
libgfortran/gfortran.map
libgfortran/intrinsics/random_init.f90 [new file with mode: 0644]