gfortran
コンパイル段階でソース ファイルへのアクセスに使用されたパスを埋め込みます。たとえば、ファイルへのフル パスを指定してコンパイルすると、デバッグ出力にフル パスが表示されます。相対パスでコンパイルすると、出力に相対パスが表示されます。
~/tests[520]$ gfortran -o test.x test.f90
~/tests[521]$ test.x
At line 3 of file test.f90 (unit = 200, file = '')
Fortran runtime error: File '' does not exist
~/tests[522]$ gfortran -o test.x ./test.f90
~/tests[523]$ test.x
At line 3 of file ./test.f90 (unit = 200, file = '')
Fortran runtime error: File '' does not exist
~/tests[524]$ gfortran -o test.x ~/tests/test.f90
~/tests[525]$ test.x
At line 3 of file /home/username/tests/test.f90 (unit = 200, file = '')
Fortran runtime error: File '' does not exist
相対パスを使用してのみソースにアクセスするようにコンパイル コマンドを変更します。