[Bug fortran/20085] New: iargc returns wrong count for number of program arguments

dir at lanl dot gov gcc-bugzilla@gcc.gnu.org
Sat Feb 19 23:16:00 GMT 2005


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



More information about the Gcc-bugs mailing list