This is the mail archive of the gcc-patches@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]

Re: [gfortran] Fix list directed reads of real number


On Fri, Dec 10, 2004 at 11:27:27AM -0800, Steve Kargl wrote:
> On Wed, Dec 08, 2004 at 10:25:36PM -0800, Steve Kargl wrote:
> > The attached patch fixes a bug in the list directed read of
> > several values from a single line.  This patch has been
> > bootstrapped and regression tested on i386-*-FreeBSD6.0.
> > It actually fixes 4 failures in the testsuite.
> 
> This patch also appears to fix PR 17597.
> 

Crud!  The patch doesn't totally fix the problem.

troutmask:sgk[330] gfc -o fg fg.f90
troutmask:sgk[331] ./fg
 10,-20,30,40                                                                    
   10.00000       0.000000       30.00000       40.00000    
troutmask:sgk[332] cat fg.f90
program fg
  character(len=80) buff
  write (buff,'(a)') '10,-20,30,40'
  read(buff,*) a, b, c, d
  print *, buff
  print*, a, b, c, d
end program

If a minus sign follows a comma, my  patch appears to miss
the next digit.

-- 
Steve


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