1! RUN: %S/test_symbols.sh %s %t %f18 2 3 4! Test that a procedure is only implicitly resolved as an intrinsic function 5! (resp. subroutine) if this is a function (resp. subroutine) 6 7!DEF: /expect_external (Subroutine) Subprogram 8subroutine expect_external 9 !DEF: /acos EXTERNAL (Subroutine) ProcEntity 10 !DEF: /expect_external/x (Implicit) ObjectEntity REAL(4) 11 call acos(x) 12 !DEF: /expect_external/i (Implicit) ObjectEntity INTEGER(4) 13 !DEF: /system_clock EXTERNAL (Function, Implicit) ProcEntity REAL(4) 14 !DEF: /expect_external/icount (Implicit) ObjectEntity INTEGER(4) 15 i = system_clock(icount) 16end subroutine 17 18!DEF: /expect_intrinsic (Subroutine) Subprogram 19subroutine expect_intrinsic 20 !DEF: /expect_intrinsic/y (Implicit) ObjectEntity REAL(4) 21 !DEF: /expect_intrinsic/acos INTRINSIC (Function) ProcEntity 22 !DEF: /expect_intrinsic/x (Implicit) ObjectEntity REAL(4) 23 y = acos(x) 24 !DEF: /expect_intrinsic/system_clock INTRINSIC (Subroutine) ProcEntity 25 !DEF: /expect_intrinsic/icount (Implicit) ObjectEntity INTEGER(4) 26 call system_clock(icount) 27end subroutine 28 29! Sanity check that the EXTERNAL attribute is not bypassed by 30! implicit intrinsic resolution, even if it otherwise perfectly 31! matches an intrinsic call. 32 33!DEF: /expect_external_2 (Subroutine) Subprogram 34subroutine expect_external_2 35 !DEF: /expect_external_2/matmul EXTERNAL (Function, Implicit) ProcEntity INTEGER(4) 36 external :: matmul 37 !DEF: /expect_external_2/cpu_time EXTERNAL (Subroutine) ProcEntity 38 external :: cpu_time 39 !DEF: /expect_external_2/x ObjectEntity REAL(4) 40 !DEF: /expect_external_2/y ObjectEntity REAL(4) 41 !DEF: /expect_external_2/z ObjectEntity REAL(4) 42 !DEF: /expect_external_2/t ObjectEntity REAL(4) 43 real x(2,2), y(2), z(2), t 44 !REF: /expect_external_2/z 45 !REF: /expect_external_2/matmul 46 !REF: /expect_external_2/x 47 !REF: /expect_external_2/y 48 z = matmul(x, y) 49 !REF: /expect_external_2/cpu_time 50 !REF: /expect_external_2/t 51 call cpu_time(t) 52end subroutine 53