This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/34411] New: hang-up during read of non-expected input


I gets hang-up of the fragment of code during execution:

program zk
  real :: x,y
  do
     read(*,'(T7,2F9.3)',iostat=ii,end=666) x,y
     if( iostat == 0 ) write(*,*) x,y
  end do
666 continue
end program zk

with this data on input:

 NL   NX   NY  LOWBAD HIGHBAD  THRESH     AP1  PH/ADU  RNOISE
  2  765  510 1.26E+3 6.50E+4  156.96    2.00    2.30   15.00

   289  329.142  214.107   12.313   12.050   11.913   11.868   11.834   11.722  
     2038.497 99.99  0.00   0.019    0.021    0.025    0.034    0.045    0.055  

   413  360.334  245.261   12.375   11.910   11.469   11.086   10.719   10.327  
     2596.395 99.99  0.00   0.019    0.017    0.016    0.015    0.015    0.014  

   655  332.704  317.964   12.523   12.212   11.998   11.892   11.819   11.711  
     1627.586 99.99  0.00   0.005    0.005    0.006    0.007    0.009    0.011  

   360  379.769  231.226   12.709   12.422   12.195   11.941   11.644   11.324  
     2561.539 99.99  0.00   0.042    0.043    0.050    0.055    0.057    0.057  

 ------
The reason of this is read only lines with float numbers on appropriate
positions. For example, the first line to read is '289  329.142  214.107...'.

The hang-up has been verified under various recent linux distributions (Ubuntu,
Gentoo (gcc version 4.1.2), ... ), architectures (amd64, i686) and under last
night-build (gcc version 4.3.0 20071209 (experimental) [trunk revision 130717]
(GCC)).

The code is correctly compiled without any warnings as 'gfortran -Wall zk.f90'.

The fragment of the code comes from my long-term project Munipack and has been
verified by a lot of f90 and f77 compilers and it doesn't violate any fortran
norm (in my oppinion). The hang-up doesn't not appear with original g95
project, but only with the new gfortran project at least year ago.


-- 
           Summary: hang-up during read of non-expected input
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hroch at physics dot muni dot cz


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34411


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]