This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Gfc bug: internal recursion run-time error
- From: Mark Hadfield <m dot hadfield at niwa dot co dot nz>
- To: fortran at gcc dot gnu dot org
- Date: Mon, 10 Jan 2005 11:37:53 +1300
- Subject: Gfc bug: internal recursion run-time error
- Organization: NIWA
Hi
The attached program looks like valid Fortran to me. It should print the
string "aaaa". It works OK on several compilers (Compaq Visual Fortran
6.6 on Windows, Absoft Pro Fortran 8.0 on Linux, Cray CF90 on Cray T3E).
On gfortran (Cygwin) it gives the following run-time error:
$ gfc test.f90 -o test.exe && ./test
At line 5 of file test.f90
Internal Error: Recursive library calls not allowed
Gfortran version is
$ gfc -v
Reading specs from
/usr/local/share/irun/bin/../lib/gcc/i686-pc-cygwin/4.0.0/specs
Configured with: ../gcc-4.0-20041114/configure --prefix=/irun
--enable-languages=f95 --with-gmp=/usr/local/gmp --with-mpfr=/usr/local/gmp
Thread model: single
gcc version 4.0.0 20041114 (experimental)
--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
module mymod
contains
function mystring ()
character(len=4) :: mystring
write (unit=mystring,fmt='(A)') 'aaaa'
end function mystring
end module mymod
program main
use mymod
write (unit=*,fmt='(A)') mystring()
end program main