Produces a compiler listing file that includes the source section of the listing and provides additional source information when printing error messages.
.-nosource-. >>- -q--+-source---+-------------------------------------------><
@PROCESS:
@PROCESS SOURCE | NOSOURCE
-qnosource
This option displays on the terminal each source line where the compiler detects a problem, which can be very useful in diagnosing program errors in the Fortran source files.
You can selectively print parts of the source code by using SOURCE and NOSOURCE in @PROCESS directives in the source files around those portions of the program you want to print. This is the only situation where the @PROCESS directive does not have to be before the first statement of a compilation unit.
$ cat argument_mismatch.f
subroutine mult(x,y)
integer x,y
print *,x*y
end
program wrong_args
interface
subroutine mult(a,b) ! Specify the interface for this
integer a,b ! subroutine so that calls to it
end subroutine mult ! can be checked.
end interface
real i,j
i = 5.0
j = 6.0
call mult(i,j)
end
$ xlf95 argument_mismatch.f
** mult === End of Compilation 1 ===
"argument_mismatch.f", line 15.20: 1513-061 (S) Actual argument attributes
do not match those specified by an accessible explicit interface.
** wrong_args === End of Compilation 2 ===
1501-511 Compilation failed for file argument_mismatch.f.
$ xlf95 -qsource argument_mismatch.f
** mult === End of Compilation 1 ===
15 | call mult(i,j)
............a...
a - "argument_mismatch.f", line 15.20: 1513-061 (S) Actual argument attributes do not match those
specified by an accessible explicit interface.
** wrong_args === End of Compilation 2 ===
1501-511 Compilation failed for file argument_mismatch.f.