https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615
Bug ID: 81615 Summary: save-temps and gfortran produces *.f90 files instead of *.i or *i90 files Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: barrowes at alum dot mit.edu Target Milestone: --- 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 of the preprocessed temporary files to i or i90 instead of f90?