+2005-02-20 Steven G. Kargl <kargls@comcast.net>
+
+ PR 20085
+ * intrinsic/args.c (iargc): Off by 1.
+
2005-02-19 Steven G. Kargl <kargls@comcast.net>
* intrinsic/date_and_time.c: Fix conformance problems.
/* Implementation of the GETARG and IARGC g77, and
corresponding F2003, intrinsics.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
Contributed by Bud Davis and Janne Blomqvist.
This file is part of the GNU Fortran 95 runtime library (libgfortran).
}
-/* Return the number of commandline arguments. */
+/* Return the number of commandline arguments. The g77 info page
+ states that iargc does not include the specification of the
+ program name itself. */
extern GFC_INTEGER_4 iargc (void);
export_proto(iargc);
get_args (&argc, &argv);
- return argc;
+ return (argc - 1);
}