This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/20085] New: iargc returns wrong count for number of program arguments
- From: "dir at lanl dot gov" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Feb 2005 17:56:30 -0000
- Subject: [Bug fortran/20085] New: iargc returns wrong count for number of program arguments
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Function iargc return the wrong argument count on the Macintosh. It returns 1
when it should be zero etc... -
[dir:~/tests/gfortran] dir% gfortran -o mopen mopen.f
[dir:~/tests/gfortran] dir% mopen
1
STOP 0
[dir:~/tests/gfortran] dir% mopen one
1 one
2
STOP 0
[dir:~/tests/gfortran] dir% cat mopen.f
program mopen
character*80 c
integer i,iargc
iargs=iargc()
do 10 i=1,iargs
call getarg(i,c)
write(*,*)i,c
10 continue
stop
end
[dir:~/tests/gfortran] dir%
--
Summary: iargc returns wrong count for number of program
arguments
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dir at lanl dot gov
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: powerpc-apple-darwin7.8.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20085