This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
ICE on iargc()/command_argument_count() etc.
- From: Charlie Zender <zender at uci dot edu>
- To: GNU Fortran Project <fortran at gcc dot gnu dot org>
- Date: Tue, 14 Oct 2003 16:31:31 -0700
- Subject: ICE on iargc()/command_argument_count() etc.
- Reply-to: Charlie Zender <zender at uci dot edu>
Hi,
I am using CVS gfortran sources from 20031014 on debian unstable i686.
The following fortran90 code shows that neither
command_argument_count(), nor the old backward compatibility function
iargc() work. Presumably nor do getarg() and get_command_argument().
Andy Vaught has implemented iargc() and getarg() in g95.
If someone ports that to gfortran, then I will help test gfortran as
well as g95.
Thanks!
Charlie
program tst
! print *, iargc()
print *, command_argument_count()
end program tst
With command_argument_count():
zender@ashes:~/f$ gfortran --version
GNU Fortran 95 (GCC 3.5-tree-ssa 20031014 (merged 20031005))
Copyright (C) 2003 Free Software Foundation, Inc.
zender@ashes:~/f$ gfortran -o tst tst.f90
/tmp/cc2IusfD.o(.text+0x3b): In function `MAIN__':
: undefined reference to `command_argument_count__'
collect2: ld returned 1 exit status
With iargc():
zender@ashes:~/f$ gfortran -o tst tst.f90
tst.f90: In function `MAIN__':
tst.f90:8: internal compiler error: in gfc_conv_intrinsic_function, at fortran/trans-intrinsic.c:3072
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
Charlie Zender, zender at uci dot edu, (949) 824-2987, Department of
Earth System Science, University of California, Irvine CA 92697-3100