https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82938
Bug ID: 82938 Summary: Speed regression in internal read Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: manfred99 at gmx dot ch Target Milestone: --- #!/bin/sh seq --format="%.1f" 1 1000000 > read.txt cat > read.f <<EOF real f character*12 buffer open(10,file="read.txt") 1 read(10,'(a)',end=2) buffer read(buffer,'(f12.0)') f !!read(buffer,*) f print*,f goto 1 2 close(10) end EOF cmd="gfc-bin" $cmd --version $cmd read.f -g time ./read >/dev/null On my box, this short program takes 2.4s for GNU Fortran (GCC) 8.0.0 20170828 (experimental) [trunk revision 251373] 4.4s for GNU Fortran (GCC) 8.0.0 20170829 (experimental) [trunk revision 251395] This is most likely due to http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=251374 Of these 4.4s, about 4s are solely taken by the line "read(buffer,'(f12.0)') f". It is really "amazing" how slow internal read is, compare e.g. with a C program ... This issue clearly shows as a regression in a operational program of mine, so no artificial, constructed issue.