This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
I agree that the current handling of *.f90 and *.f with
-cpp and -save-temps is undocumented and partially broken.

Consider creating a *.f90 file from a *.f file:

$ cat foo.f
      programme main
      end
$ gfortran -cpp -save-temps foo.f
$ cat foo.f90
# 1 "foo.f"
# 1 "<eingebaut>"
# 1 "<Kommandozeile>"
# 1 "foo.f"
      programme main
      end
$ gfortran foo.f90 
foo.f90:1:13:

 # 1 "foo.f"
             1
Fehler: Ungültige Form der PROGRAM-Anweisung bei (1)

Here, we generate a fixed-form program source with an
extension that is usually an indicator of fixed form.

One possibility would be to disable -save-temps together
with -cpp when the source file is *.f or *.f90 (or *.f03).

Creating *.f90 from *.F90 is also dangerous on Windows systems.

I think creating *.i and *.i90 files, respectively, would be
a better option. ifort does so, so there is at least some
precedent.

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