From ed8315d5fcd7a86afc791a2643ef329aa599b2f5 Mon Sep 17 00:00:00 2001 From: Francois-Xavier Coudert Date: Wed, 29 Aug 2007 15:22:55 +0000 Subject: re PR libfortran/32989 (GETARG intrinsic) PR fortran/32989 * iresolve.c (gfc_resolve_getarg): Handle non-default integer kinds. * check.c (gfc_check_getarg): New function * intrinsic.h: Add prototype for gfc_check_getarg. * intrinsic.c (add_subroutines): Add reference to gfc_check_getarg. * intrinsic.texi (GETARG): Adjust documentation. * gfortran.fortran-torture/execute/getarg_1.f90: Add check for non-default integer kind arguments. From-SVN: r127905 --- gcc/fortran/intrinsic.texi | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'gcc/fortran/intrinsic.texi') diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi index d70e819..876015b 100644 --- a/gcc/fortran/intrinsic.texi +++ b/gcc/fortran/intrinsic.texi @@ -4609,21 +4609,22 @@ GNU extension Subroutine @item @emph{Syntax}: -@code{CALL GETARG(N, ARG)} +@code{CALL GETARG(POS, VALUE)} @item @emph{Arguments}: @multitable @columnfractions .15 .70 -@item @var{N} @tab Shall be of type @code{INTEGER(4)}, @math{@var{N} \geq 0} -@item @var{ARG} @tab Shall be of type @code{CHARACTER(*)}. +@item @var{POS} @tab Shall be of type @code{INTEGER} and not wider than +the default integer kind; @math{@var{POS} \geq 0} +@item @var{VALUE} @tab Shall be of type @code{CHARACTER(*)}. @end multitable @item @emph{Return value}: -After @code{GETARG} returns, the @var{ARG} argument holds the @var{N}th -command line argument. If @var{ARG} can not hold the argument, it is -truncated to fit the length of @var{ARG}. If there are less than @var{N} -arguments specified at the command line, @var{ARG} will be filled with blanks. -If @math{@var{N} = 0}, @var{ARG} is set to the name of the program (on systems -that support this feature). +After @code{GETARG} returns, the @var{VALUE} argument holds the +@var{POS}th command line argument. If @var{VALUE} can not hold the +argument, it is truncated to fit the length of @var{VALUE}. If there are +less than @var{POS} arguments specified at the command line, @var{VALUE} +will be filled with blanks. If @math{@var{POS} = 0}, @var{VALUE} is set +to the name of the program (on systems that support this feature). @item @emph{Example}: @smallexample -- cgit v1.1