diff options
author | Francois-Xavier Coudert <coudert@clipper.ens.fr> | 2006-07-04 13:39:46 +0200 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2006-07-04 11:39:46 +0000 |
commit | 12197210b4a551893af85d4b898f74176f3ff36d (patch) | |
tree | 95fe84a7cd588da64cb8cea0d251407d2b14864c /gcc/fortran/check.c | |
parent | 0b50988af53a1e6237a8c3b61c5da1c4d1a41117 (diff) | |
download | gcc-12197210b4a551893af85d4b898f74176f3ff36d.zip gcc-12197210b4a551893af85d4b898f74176f3ff36d.tar.gz gcc-12197210b4a551893af85d4b898f74176f3ff36d.tar.bz2 |
intrinsic.c (add_subroutines): Add ITIME and IDATE.
* intrinsic.c (add_subroutines): Add ITIME and IDATE.
* intrinsic.h (gfc_check_itime_idate,gfc_resolve_idate,
fc_resolve_itime): New protos.
* iresolve.c (gfc_resolve_itime, gfc_resolve_idate): New functions.
* check.c (gfc_check_itime_idate): New function.
* intrinsic.texi: Document the new intrinsics.
* intrinsics/date_and_time.c (itime0,idate0,itime_i4,itime_i8,
idate_i4,idate_i8): New functions.
* gfortran.dg/itime_idate_1.f: New test.
* gfortran.dg/itime_idate_2.f: New test.
Co-Authored-By: Daniel Franke <franke.daniel@gmail.com>
From-SVN: r115173
Diffstat (limited to 'gcc/fortran/check.c')
-rw-r--r-- | gcc/fortran/check.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index dfa1c2d..5f536f5 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -3037,6 +3037,28 @@ gfc_check_hostnm_sub (gfc_expr * name, gfc_expr * status) try +gfc_check_itime_idate (gfc_expr * values) +{ + if (array_check (values, 0) == FAILURE) + return FAILURE; + + if (rank_check (values, 0, 1) == FAILURE) + return FAILURE; + + if (variable_check (values, 0) == FAILURE) + return FAILURE; + + if (type_check (values, 0, BT_INTEGER) == FAILURE) + return FAILURE; + + if (kind_value_check(values, 0, gfc_default_integer_kind) == FAILURE) + return FAILURE; + + return SUCCESS; +} + + +try gfc_check_ttynam_sub (gfc_expr * unit, gfc_expr * name) { if (scalar_check (unit, 0) == FAILURE) |