cat telltest.txt
123456
789
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
cat telltest.f
C234567
integer i
character*99 buffer
open(10,FILE="telltest.txt")
read(10,'(a)') buffer
!!read(10,*) buffer
call ftell(10,i)
print*,i
close(10)
end
With gfortran-4.3, this prints "7".
With gfortran-4.5, I get "99" for the "(a)" variant,
and "80" for the "*" variant.
"7" is definitely the right answer, IMO.
--
Summary: Regression: wrong results with ftell
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: manfred99 at gmx dot ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43605