Line number continuation with f77 code compiled with pgf90

I am compiling fortran 77 fixed form code with pgf90 using GNU emacs and I have put the continuation character at line 6 and then continued with the code



When I do this and run it I get a file not found run time error. So the run time error seems to mistake /home/a/o/p/data run/fort.10 and puts a space in between data and run and reports file not found.

How can I fix this ?

Not a good idea to break up strings across lines in std fortran.
I think this will be handled inconsistently.

I don’t think this is going to get ‘corrected’. look at this example
that tried to put a character in column 6 to continue the
filename path on the next line.

program fio
c test buffering of Fortran unformatted I/O
integer IA(5)
c open the input file
open (unit=9, file=’/home/tull/xfer/tprs/uf/metstudent/
1dev/dev2/dev3/’, iostat=ios)
if (ios .ne. 0) then
write (0, *) 'Error: cannot open; iostat = ', ios
call abort
end if
c read the input file parameters
read (9, 100) IA
100 format (i5)

close (9)
print *,“IA=”,IA

The above failed during execution on ifort, gfortran and pgfortran.
Don’t do it.


If I continue the string in the same line I get a syntax error PGF90-S-0034 or near end of line 75 during compilation.

So how do I fix it ?

I am trying to compile with pgf90 compiler and I am getting this error. Looking at past posts I saw I need to add -Mfixed and I am still getting the same error.

Then I tried compiling with pgfortran still got same error. So I am out of options.

Another error I get this this pgf90-s-0026 - unmatched quote

It is the same problem. Continuing a line beyond what is permitted.


I tried with the -Mextend option and now I get a file not found error much later in the code. That file path is very much valid. With Emacs my editor has now red marks where the line extension(indicating something is wrong). However the file compiles fine.

I was able to solve this problem by adding & at the end of a line and at the beginning of the continuing line.