Error in egcs FORTRAN I/O?

craig@jcb-sc.com craig@jcb-sc.com
Sat Jun 19 06:49:00 GMT 1999


Just rediscovered this old email.  Is it still pertinent, to egcs 1.1.2,
or the 1.2 (gcc 2.95) version being prepared for release?  If so, do
you have more information, per a more complete bug report?  (If not
still pertinent, feel free to just ignore this email!)

        tq vm, (burley)


>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...


More information about the Gcc mailing list