To: J3 J3/23-193r1 From: Lorri Menard Subject: F202Y Intrinsics for source location Date: 2023-June-15 Reference: 23-154 Users have requested a way to get the source name and source line in their programs, as well as the current procedure name. Uses for this would be as a debugging aid, perhaps for logging purposes, etc. This can be done with many preprocessors today; the gcc spellings are __FILE__ and __LINE__ for example map onto the source filename and the source line number. And this could also be part of the Fortran preprocessor feature request as well, of course. To avoid the requirement of a preprocessor, this proposal is to create module intrinsics, similar to COMPILER_OPTIONS and COMPILER_VERSION, and nominally called SOURCE_FILE, SOURCE_LINE and PROCEDURE_NAME, that can be called in the user program to retrieve this information. These should be useable in constant expressions or specification inquiries, again, similar to COMPILER_OPTIONS and COMPILER_VERSION.