This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
bug with PATCH Fix PR 20085 [aka command_argument_count()]?
- From: Satish Balay <balay at fastmail dot fm>
- To: fortran at gcc dot gnu dot org
- Date: Fri, 25 Feb 2005 15:45:24 -0600 (CST)
- Subject: bug with PATCH Fix PR 20085 [aka command_argument_count()]?
I get the following with the latest fedora rawhide compiler - which I
guess - has the 'PATCH Fix PR 20085'
Both - command_argument_count() & iargc() should return the same value
'0'. But I think there is code somewere which does
'command_argument_count() = iargc() -1' causing this bug.
thanks,
Satish
--------
[balay@localhost junk]$ gfortran -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --with-gxx-include-dir=/usr/include/c++/3.4.3 --enable-languages=c,c++,java,f95 --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 4.0.0 20050223 (Red Hat 4.0.0-0.29)
[balay@localhost junk]$ cat arg.f
program test
character(len=50) :: s
integer a,b
a = command_argument_count()
b = iargc()
print*, a,b
end program test
[balay@localhost junk]$ gfortran arg.f
[balay@localhost junk]$ ./a.out
-1 0
[balay@localhost junk]$