aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-intrinsic.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/trans-intrinsic.c')
-rw-r--r--gcc/fortran/trans-intrinsic.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index dcabd4112fe..014709327b2 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -1032,8 +1032,8 @@ gfc_conv_intrinsic_minmax (gfc_se * se, gfc_expr * expr, int op)
}
-/* Create a symbol node for this intrinsic. The symbol form the frontend
- is for the generic name. */
+/* Create a symbol node for this intrinsic. The symbol from the frontend
+ has the generic name. */
static gfc_symbol *
gfc_get_symbol_for_expr (gfc_expr * expr)
@@ -2649,11 +2649,10 @@ gfc_conv_intrinsic_repeat (gfc_se * se, gfc_expr * expr)
}
-/* Generate code for the IARGC intrinsic. If args_only is true this is
- actually the COMMAND_ARGUMENT_COUNT intrinsic, so return IARGC - 1. */
+/* Generate code for the IARGC intrinsic. */
static void
-gfc_conv_intrinsic_iargc (gfc_se * se, gfc_expr * expr, bool args_only)
+gfc_conv_intrinsic_iargc (gfc_se * se, gfc_expr * expr)
{
tree tmp;
tree fndecl;
@@ -2667,8 +2666,6 @@ gfc_conv_intrinsic_iargc (gfc_se * se, gfc_expr * expr, bool args_only)
type = gfc_typenode_for_spec (&expr->ts);
tmp = fold_convert (type, tmp);
- if (args_only)
- tmp = build2 (MINUS_EXPR, type, tmp, build_int_cst (type, 1));
se->expr = tmp;
}
@@ -2827,7 +2824,7 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr)
break;
case GFC_ISYM_COMMAND_ARGUMENT_COUNT:
- gfc_conv_intrinsic_iargc (se, expr, TRUE);
+ gfc_conv_intrinsic_iargc (se, expr);
break;
case GFC_ISYM_CONJG:
@@ -2869,7 +2866,7 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr)
break;
case GFC_ISYM_IARGC:
- gfc_conv_intrinsic_iargc (se, expr, FALSE);
+ gfc_conv_intrinsic_iargc (se, expr);
break;
case GFC_ISYM_IEOR:
@@ -2980,6 +2977,7 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr)
gfc_conv_intrinsic_bound (se, expr, 1);
break;
+ case GFC_ISYM_CHDIR:
case GFC_ISYM_DOT_PRODUCT:
case GFC_ISYM_ETIME:
case GFC_ISYM_FNUM:
@@ -2988,12 +2986,20 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr)
case GFC_ISYM_GETGID:
case GFC_ISYM_GETPID:
case GFC_ISYM_GETUID:
+ case GFC_ISYM_HOSTNM:
+ case GFC_ISYM_KILL:
+ case GFC_ISYM_IERRNO:
case GFC_ISYM_IRAND:
+ case GFC_ISYM_LINK:
case GFC_ISYM_MATMUL:
case GFC_ISYM_RAND:
+ case GFC_ISYM_RENAME:
case GFC_ISYM_SECOND:
case GFC_ISYM_STAT:
+ case GFC_ISYM_SYMLNK:
case GFC_ISYM_SYSTEM:
+ case GFC_ISYM_TIME:
+ case GFC_ISYM_TIME8:
case GFC_ISYM_UMASK:
case GFC_ISYM_UNLINK:
gfc_conv_intrinsic_funcall (se, expr);