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 libfortran/24416] Wrong reading following namelist reading



------- Comment #5 from fxcoudert at gcc dot gnu dot org  2005-10-24 12:53 -------
Here is another example of this problem (or so I think), reported today on the
list:

# cat bug.f90
     program bugged
     character*80 mc_sample
     namelist /BUG/ mc_sample

! Sequence without read of Namelist
     open(10,file='bug.in')
     !read(10,BUG)
     close(10)

     print *, 'Enter integer'
     read(*,*) nalt
     print *, nalt

! Same sequence with read of Namelist
     open(10,file='bug.in')
     read(10,BUG)
     close(10)

     call flush(5)
     call flush(6)
     call flush(10)
     print *, 'Enter integer'
     read(*,*) nalt
     print *, nalt

     end
# cat bug.in
$BUG
 mc_sample ='mcmc_run001'
$end
# gfortran a.f90 && ./a.out
 Enter integer
15
          15
 Enter integer
15
At line 23 of file a.f90
Fortran runtime error: Integer overflow while reading item 1


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2005-10-17 22:10:20         |2005-10-24 12:53:24
               date|                            |


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


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