This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
save-temps and gfortran produces *.f90 files instead of *.i files
- From: Ben Barrowes <barrowes at alum dot mit dot edu>
- To: fortran at gcc dot gnu dot org
- Date: Wed, 14 Jun 2017 05:33:02 -0700 (MST)
- Subject: save-temps and gfortran produces *.f90 files instead of *.i files
- Authentication-results: sourceware.org; auth=none
If I have a file test1.f:
program test2
real x
x=3.0
C#ifdef DDD
C x=2.0
C#endif
print *,'x=',x
end
and I compile it with:
gfortran -save-temps -o test0 test0.f
I get two temporary files, test0.o and test0.s.
If I uncomment the directive:
program test2
real x
x=3.0
#ifdef MPI
x=2.0
#endif
print *,'x=',x
end
and compile with:
gfortran -cpp -save-temps -o test0 test0.f
In addition to the two temporary files above, a test0.f90 is produced that
looks like:
# 1 "test0.f"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "test0.f"
program test2
real x
x=3.0
print *,'x=',x
end
I was under the impression that I would get a test0.i file since the only
documentation of using -save-temps I can find comes from the gcc docs:
https://gcc.gnu.org/onlinedocs/gcc/Developer-Options.html#index-save-temps
which mentions *.i files in their example.
And if I have a file test1.f90:
program test1
real x
x=3.0
#ifdef MPI
x=2.0
#endif
print *,'x=',x
end
and I compile with:
gfortran -cpp -save-temps -o test1 test1.f90
The test1.o and test1.s files are produced, but no preprocessed fortran
source file is produced (I suppose because the source file already has the
f90 extension).
How can I get a preprocessed source file in this case? Where is this
behavior of -save-temps producing *.f90 files documented? Can I change the
f90 extension to i or i90instead?
--
View this message in context: http://gcc.1065356.n8.nabble.com/save-temps-and-gfortran-produces-f90-files-instead-of-i-files-tp1383977.html
Sent from the gcc - fortran mailing list archive at Nabble.com.