Page 1 Source Listing TESTLOC 2024-01-29 21:03 FOR\TESTLOC.F90 1 PROGRAM TESTLOC 2 3 use, intrinsic :: iso_c_binding 4 use, intrinsic :: iso_fortran_env 5 6 REAL, TARGET :: X 7 REAL, TARGET :: Y 8 9 PRINT *,'Address Locations Command Test' 10 11 X = 1.23456789 12 PRINT *,'X is :', X 13 PRINT *,' address by c_loc:', transfer(c_loc(X),0_int64) 14 PRINT *,' address by loc :', loc(X) 15 16 Y = 9.87654321 17 PRINT *,'Y is :', Y 18 PRINT *,' address by c_loc:', transfer(c_loc(Y),0_int64) 19 PRINT *,' address by loc :', loc(Y) 20 21 END PROGRAM TESTLOC ENTRY POINTS Address Type Name MAIN__ Page 2 Source Listing TESTLOC 2024-01-29 21:03 Symbol Table FOR\TESTLOC.F90 SYMBOL CROSS REFERENCE Name Object Declared Type Bytes Dimen Elements Attributes References 0 Local 13 C_PTR 8 scalar PRIV C_LOC Local 13 scalar 13,18 C_LOC_PRIVATE Func 13 RECORD 8 scalar PRIV 13,18 INT64 Param 13 I(4) 4 scalar 13,18 ISO_C_BINDING Module 3 3 ISO_FORTRAN_ENV Module 4 4 LOC Func 14 scalar 14,19 TESTLOC Prog 1 TRANSFER Func 13 scalar 13,18 X Local 6 R(4) 4 scalar TGT 11,12,13,14 Y Local 7 R(4) 4 scalar TGT 16,17,18,19 Page 3 Source Listing TESTLOC 2024-01-29 21:03 Subprograms/Common Blocks FOR\TESTLOC.F90 SUBPROGRAMS/COMMON BLOCKS Name Object Declared Type Bytes Dimen Elements Attributes References TESTLOC Prog 1 COMPILER: Intel(R) Fortran 24.0-1238 TESTLOC.EXEyIntel Fortran CompilerzŽÀsŒ‹‰Ê Address Locations Command Test X is : 1.234568 address by c_loc: 140698356248132 address by loc : 140698356248132 Y is : 9.876543 address by c_loc: 140698356248128 address by loc : 140698356248128