Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26745 Discussions

ifort does not remove temps when using -syntax-only

ereisch
Novice
276 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

0 Kudos
4 Replies
Juergen_R_R
Valued Contributor I
276 Views

I don’t get what the question is?

ereisch
Novice
276 Views

Not a question, a potential bug report.

ereisch
Novice
225 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

ereisch
Novice
220 Views

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

Reply