Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28446 Discussions

ifort does not remove temps when using -syntax-only

ereisch
New Contributor II
940 Views

Attempting to compile a file that requires preprocessing, the output of the preprocessor is saved in the current working folder, irrespective of the -[no-]save-temps and -[no]keep flags.  If you compile a file that has a .fpp extension (using the "-c" flag, for example on "test.fpp"), you only receive the output file as test.o in the working folder.  However, if you run the same compiler switches but replace the "-c" with "-syntax-only", the compiler leaves the "temp.i" file in the current folder.

Using ifort 18.0.5

4 Replies
Juergen_R_R
Valued Contributor I
940 Views

I don’t get what the question is?

0 Kudos
ereisch
New Contributor II
940 Views

Not a question, a potential bug report.

0 Kudos
ereisch
New Contributor II
889 Views

I would like to bump this issue, as it is also present in 19.1.3.304, and occurs in more cases than just "-syntax-only".  We are now beginning to make heavier use of the preprocessor, and whenever the "-fpp" flag is set, the intermediate ".i" files are always created (and left behind) in the current working folder.  This is regardless of whether the "-no-save-temps" flag is set.

Also, to reduce filesystem thrash (especially when working on networked filesystems), it would be convenient to offer an equivalent of the gcc "-pipe" flag:

-pipe: Use pipes rather than temporary files for communication between the various stages of compilation.

Thanks

0 Kudos
ereisch
New Contributor II
884 Views

EDIT: Digging into this a bit more, it seems to only occur when "-syntax-only" is set.

Reply