diff options
Diffstat (limited to 'gcc/fortran/iresolve.c')
-rw-r--r-- | gcc/fortran/iresolve.c | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c index 4973eb43e0d..22aeda8eedb 100644 --- a/gcc/fortran/iresolve.c +++ b/gcc/fortran/iresolve.c @@ -441,6 +441,28 @@ gfc_resolve_cshift (gfc_expr * f, gfc_expr * array, void +gfc_resolve_ctime (gfc_expr * f, gfc_expr * time) +{ + gfc_typespec ts; + + f->ts.type = BT_CHARACTER; + f->ts.kind = gfc_default_character_kind; + + /* ctime TIME argument is a INTEGER(KIND=8), says the doc */ + if (time->ts.kind != 8) + { + ts.type = BT_INTEGER; + ts.kind = 8; + ts.derived = NULL; + ts.cl = NULL; + gfc_convert_type (time, &ts, 2); + } + + f->value.function.name = gfc_get_string (PREFIX("ctime")); +} + + +void gfc_resolve_dble (gfc_expr * f, gfc_expr * a) { f->ts.type = BT_REAL; @@ -561,6 +583,15 @@ gfc_resolve_exponent (gfc_expr * f, gfc_expr * x) void +gfc_resolve_fdate (gfc_expr * f) +{ + f->ts.type = BT_CHARACTER; + f->ts.kind = gfc_default_character_kind; + f->value.function.name = gfc_get_string (PREFIX("fdate")); +} + + +void gfc_resolve_floor (gfc_expr * f, gfc_expr * a, gfc_expr * kind) { f->ts.type = BT_INTEGER; @@ -2145,6 +2176,32 @@ gfc_resolve_free (gfc_code * c) void +gfc_resolve_ctime_sub (gfc_code * c) +{ + gfc_typespec ts; + + /* ctime TIME argument is a INTEGER(KIND=8), says the doc */ + if (c->ext.actual->expr->ts.kind != 8) + { + ts.type = BT_INTEGER; + ts.kind = 8; + ts.derived = NULL; + ts.cl = NULL; + gfc_convert_type (c->ext.actual->expr, &ts, 2); + } + + c->resolved_sym = gfc_get_intrinsic_sub_symbol (PREFIX("ctime_sub")); +} + + +void +gfc_resolve_fdate_sub (gfc_code * c) +{ + c->resolved_sym = gfc_get_intrinsic_sub_symbol (PREFIX ("fdate_sub")); +} + + +void gfc_resolve_gerror (gfc_code * c) { c->resolved_sym = gfc_get_intrinsic_sub_symbol (PREFIX ("gerror")); |