aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-decl.c
diff options
context:
space:
mode:
authorJanne Blomqvist <jblomqvi@cc.hut.fi>2004-07-04 20:00:12 +0300
committerPaul Brook <pbrook@gcc.gnu.org>2004-07-04 17:00:12 +0000
commitb41b25345b30416cc308c8b412a81542e2fe00f3 (patch)
treebf14ee897d80e183e56fcc50abe726cd40989776 /gcc/fortran/trans-decl.c
parentdafa622b60c5db11daf3ea3ab8e91da1df25a093 (diff)
downloadgcc-b41b25345b30416cc308c8b412a81542e2fe00f3.zip
gcc-b41b25345b30416cc308c8b412a81542e2fe00f3.tar.gz
gcc-b41b25345b30416cc308c8b412a81542e2fe00f3.tar.bz2
re PR libfortran/15280 (Fortran9x commandline not accessable)
PR fortran/15280 PR fortran/15665 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and GFC_ISYM_COMMAND_ARGUMENT_COUNT. * intrinsic.c (add_functions): Identify iargc. Add command_argument_count. (add_subroutines): Resolve getarg. Add get_command and get_command_argument. * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command, gfc_resolve_get_command_argument): Add prototypes. * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command, gfc_resolve_get_command_argument): New functions. * trans-decl.c (gfor_fndecl_iargc): New variable. (gfc_build_intrinsic_function_decls): Set it. * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function. (gfc_conv_intrinsic_function): Use it. * trans.h (gfor_fndecl_iargc): Declare. libgfortran/ * libgfortran.h (gfc_strlen_type): Define. * intrinsics/args.c (getarg): Rename ... (getarg_i4): ... to this. (getarg_i8, get_command_argument_i4, get_command_argument_i8, get_command_i4, get_command_i8): New functions. Co-Authored-By: Paul Brook <paul@codesourcery.com> From-SVN: r84087
Diffstat (limited to 'gcc/fortran/trans-decl.c')
-rw-r--r--gcc/fortran/trans-decl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index 480a8be..47d9ba5 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -125,6 +125,7 @@ tree gfor_fndecl_adjustr;
tree gfor_fndecl_size0;
tree gfor_fndecl_size1;
+tree gfor_fndecl_iargc;
/* Intrinsic functions implemented in FORTRAN. */
tree gfor_fndecl_si_kind;
@@ -1518,6 +1519,11 @@ gfc_build_intrinsic_function_decls (void)
gfc_array_index_type,
2, pvoid_type_node,
gfc_array_index_type);
+
+ gfor_fndecl_iargc =
+ gfc_build_library_function_decl (get_identifier (PREFIX ("iargc")),
+ gfc_int4_type_node,
+ 0);
}