diff options
author | tobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-04 21:30:32 +0000 |
---|---|---|
committer | tobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-04 21:30:32 +0000 |
commit | 82bbe4ec19209878d7c67e0b715ddd1bb4812468 (patch) | |
tree | 8fc6d2fea1b1e4f419fa9262f4e6faa4f4e68471 /gcc/fortran/iresolve.c | |
parent | f403a081de4de3a678801c78756d2e4288e99914 (diff) | |
download | gcc-82bbe4ec19209878d7c67e0b715ddd1bb4812468.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88532 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/iresolve.c')
-rw-r--r-- | gcc/fortran/iresolve.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c index 9ae912ef73c..82c9b209429 100644 --- a/gcc/fortran/iresolve.c +++ b/gcc/fortran/iresolve.c @@ -1302,6 +1302,17 @@ gfc_resolve_sum (gfc_expr * f, gfc_expr * array, gfc_expr * dim, } +/* Resolve the g77 compatibility function SYSTEM. */ + +void +gfc_resolve_system (gfc_expr * f, gfc_expr * n ATTRIBUTE_UNUSED) +{ + f->ts.type = BT_INTEGER; + f->ts.kind = 4; + f->value.function.name = gfc_get_string (PREFIX("system")); +} + + void gfc_resolve_tan (gfc_expr * f, gfc_expr * x) { @@ -1596,6 +1607,16 @@ gfc_resolve_get_environment_variable (gfc_code * code) code->resolved_sym = gfc_get_intrinsic_sub_symbol (name); } +/* Resolve the SYSTEM intrinsic subroutine. */ + +void +gfc_resolve_system_sub (gfc_code * c) +{ + const char *name; + + name = gfc_get_string (PREFIX("system_sub")); + c->resolved_sym = gfc_get_intrinsic_sub_symbol (name); +} /* Determine if the arguments to SYSTEM_CLOCK are INTEGER(4) or INTEGER(8) */ |