internal write is broken
Steve Kargl
sgk@troutmask.apl.washington.edu
Wed Apr 7 10:51:00 GMT 2004
Paul,
Bud has been helping me chance down a problem, and I think
I have isolated it to the non-mmap handling of internal writes.
kargl[204] cat c.f90
program c
character(len=20) fmt
write(fmt,'(A)') '(ES12.4)'
end program c
kargl[205] ./c
At line 3 of file c.f90
Fortran runtime error: Missing initial left parenthesis in format
This problem is associated with the commits of 20040324 [1]. By
sprinkling printf's in libgfortran, I've determined that ioparm in
parse_format() of io/format.c (line 929) is a junk pointer. It
appears that the non-mmap path through mmap_open in io/unix.c does
not properly set up the pointers (or memory is getting stomped on) [2].
Paul or Bud (or anyone else) can you disable the use of mmap in
libgfortran and try compiling and executing the above code.
[1] If someone can tell me the magical incantation to get a diff
of the files in the tree-ssa on the 20040324 compared to 20040323,
I'll check out what is causing the breakage.
[2] I'll see if I can find a valgrind-like tool for FreeBSD
to determine if we are stomping memory.
--
Steve
More information about the Fortran
mailing list