gfortran io

Jean-Philippe Chancelier jpc@cermics.enpc.fr
Fri Feb 1 16:52:00 GMT 2008



      Hello, 
      
      I reported in a previous mail a gfortran io bug in the following 
      program 

      program bug 
      double precision x
      character*10 str
      character*10 fmt
      x=1.0 
      write(fmt,120) 3,0 
      write(str,fmt) x
      write(06,*) str 
 120  format('(f',i2,'.',i2,')')
      end 

      This bug seams to be still present (i.e wrong output for x=1.0 and x=7.0) 
      with the latest gcc 2.2 snapshot ? 

clio% /usr/local/mingw32-gcc4.2.3/bin/i686-pc-mingw32-gfortran -o bug bug.f
clio% ./bug 
  0.       
clio%  /usr/local/mingw32-gcc4.2.3/bin/i686-pc-mingw32-gfortran -v 
Using built-in specs.
Target: i686-pc-mingw32
Configured with: /usr/local/src/mingw32-build/source/gcc-4.2-20080123//configure -v --prefix=/usr/local/mingw32 --target=i686-pc-mingw32 --with-headers=/usr/local/mingw32/i686-pc-mingw32/include --with-gcc --with-gnu-ld --with-gnu-as --enable-threads --disable-nls --enable-languages=c,fortran,c++ --disable-win32-registry --disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 4.2.3 20080123 (prerelease)

       It seams to be ok with the following gcc-4.3 ... but I cannot use 
       gcc-4.3 which seams to give me crashes elsewhere in my program. 

 clio% /usr/local/mingw32-gcc4.3/bin/i686-pc-mingw32-gfortran -v 
Using built-in specs.
Target: i686-pc-mingw32
Configured with: /usr/local/src/mingw32-build/source/gcc-4.3-20080125//configure -v --prefix=/usr/local/mingw32 --target=i686-pc-mingw32 --with-headers=/usr/local/mingw32/i686-pc-mingw32/include --with-gcc --with-gnu-ld --with-gnu-as --enable-threads --disable-nls --enable-languages=c,fortran,c++ --disable-win32-registry --disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 4.3.0 20080125 (experimental) (GCC) 

      

       Can I expect this bug to be solved in the 4.2.3 version ? 
       or is it possible to backport to gcc 4.2 the correction from gcc 4.3 ? 

       Regards 
       jpc



More information about the Fortran mailing list