This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: Problem compiling NONMEM with mingw gfortran 4.3.0 builds


Steve Chapel wrote:
After fixing all executables and libraries to use gfortran, the program compiled and ran, but I got a Fortran runtime error: Bad file descriptor. It also shows the offending source code line as "(unit=29, file='CONOUT$')". Should CONOUT$ be con instead?

My problems with gfortran now boil down to a problem demonstrated by the following program:


      character*72 fnint
      data fnint /'con'/
      i=index(fnint,' ');
      open(unit=29,file=fnint(1:i-1))
      write(29,100)
100    format('1Hello, world!')
      end

C At line 4 of file bug.for (unit = 29, file = '')
C Fortran runtime error: File 'con' does not exist

This is a pared-down example that shows the error I'm getting with NONMEM. Basically, fnint is a character string that defines where output should go. Can someone point out a bug in the above code, and show how I can get the desired result? Or is this a bug in gfortran?

Thanks,
Steve


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