This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ICE on iargc()/command_argument_count() etc.


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]