aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/check.c
diff options
context:
space:
mode:
authorTobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>2004-10-04 23:30:32 +0200
committerTobias Schlüter <tobi@gcc.gnu.org>2004-10-04 23:30:32 +0200
commit5b1374e9650e556faaf95b9f8c16c9e730d001ed (patch)
tree8fc6d2fea1b1e4f419fa9262f4e6faa4f4e68471 /gcc/fortran/check.c
parent73a014b5498d4d6ea86796cca4a97973c9a847cd (diff)
downloadgcc-5b1374e9650e556faaf95b9f8c16c9e730d001ed.zip
gcc-5b1374e9650e556faaf95b9f8c16c9e730d001ed.tar.gz
gcc-5b1374e9650e556faaf95b9f8c16c9e730d001ed.tar.bz2
re PR fortran/17776 (no subroutine system)
fortran/ PR fortran/17776 * check.c (gfc_check_system_sub): New function. * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM. * intrinsic.c (add_functions): Add 'system'. (add_subroutines): Add 'system'. * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub): Move prototypes to other suborutines. (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub): Add prototype. (gfc_resolve_system_clock): Fix formatting of prototype. * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New functions. * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with GFC_ISYM_SYSTEM. libgfortran/ PR fortran/17776 * intrinsics/system.c: New file. * Makefile.am: Add dependency for the new file. * Makefile.in: Regenerate. From-SVN: r88532
Diffstat (limited to 'gcc/fortran/check.c')
-rw-r--r--gcc/fortran/check.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index fc5390c..a22acf0 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -2110,3 +2110,22 @@ gfc_check_getcwd_sub (gfc_expr * cwd, gfc_expr * status)
return SUCCESS;
}
+
+
+try
+gfc_check_system_sub (gfc_expr * cmd, gfc_expr * status)
+{
+ if (type_check (cmd, 0, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ if (scalar_check (status, 1) == FAILURE)
+ return FAILURE;
+
+ if (type_check (status, 1, BT_INTEGER) == FAILURE)
+ return FAILURE;
+
+ if (kind_value_check (status, 1, gfc_default_integer_kind) == FAILURE)
+ return FAILURE;
+
+ return SUCCESS;
+}