This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Error in egcs FORTRAN I/O?
- To: egcs at cygnus dot com
- Subject: Error in egcs FORTRAN I/O?
- From: Paul Bunyk <paul at pbunyk dot physics dot sunysb dot edu>
- Date: Fri, 2 Jan 1998 14:36:14 -0500
Hi!
I'm trying to use egcs 1.0 to compile our simulation program (mix of
FORTRAN and C). Everything went really great (and performance jumped
20% up in comparison to Absoft F77) until I run into an I/O error
(reproducible). I'm trying to execute the statement
READ(10,END=100,FMT='(I4)') NERR1
and it fails (with run-time error) in the middle of the file. 'errno' is
set to 29 (#define ESPIPE 29 /* Illegal seek */) and I
suspect that it happens right on the 4-K block boundary.
Another interesting observation is that in the following code from
'do_fio' which triggers the error (at line 472), the value of n is
exactly 0 (or my gdb does not show it correctly?).
(gdb) frame 7
#7 0x8069d4a in do_fio (number=0x81600bc, ptr=0x81d4b6c "", len=4)
at /tmp/egcs-1.0/gcc/f/runtime/libI77/fmt.c:472
472 errfl(f__elist->cierr,errno,"fmt");
(gdb) list
467 if(ptr==NULL)
468 return((*f__doend)());
469 f__cnt[f__cp]--;
470 f__workdone=1;
471 if((n=(*f__doed)(p,ptr,len))>0)
472 errfl(f__elist->cierr,errno,"fmt");
473 if(n<0)
474 err(f__elist->ciend,(EOF),"fmt");
475 continue;
476 case STACK:
(gdb) p n
$39 = 0
(gdb) p errno
$40 = 29
I'm using
egcs-2.90.21 971202 (egcs-1.00 release)
RedHat 5.0 on an i386
Linux version 2.0.32 (root@porky.redhat.com)
(gcc version 2.7.2.3) #1 Wed Nov 19 00:46:45 EST 1997)
Any ideas/suggestions what I can try to do next? I have the session
running in background so I can dig deeper if I'd know where to look...
Paul
--
("`-''-/").___..--''"`-._ UNIX *is* user-friendly, he is just very
`6_ 6 ) `-. ( ).`-.__.`) picky about who his friends are...
(_Y_.)' ._ ) `._ `. ``-..-' Paul Bunyk, Research Scientist
_..`--'_..-_/ /--'_.' ,'art by (and part-time UN*X sysadm)
(il),-'' (li),' ((!.-' F. Lee http://pbunyk.physics.sunysb.edu/~paul