brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · 6d7264a Raw
76 lines · plain
1! RUN: %python %S/test_symbols.py %s %flang_fc12! Test the executable part skimming for apparent calls, to ensure that3! symbols in nested scopes (BLOCK, &c.) properly shadow host symbols.4!DEF: /m Module5module m6end module7!DEF: /subr (Subroutine) Subprogram8!DEF: /subr/da INTENT(IN) ObjectEntity CLASS(*)9!DEF: /subr/ar INTENT(IN) ObjectEntity REAL(4)10subroutine subr (da, ar)11 !REF: /subr/da12 class(*), intent(in) :: da(:)13 !REF: /subr/ar14 real, intent(in) :: ar(..)15 !DEF: /subr/s2 ObjectEntity REAL(4)16 !DEF: /subr/s4 ObjectEntity REAL(4)17 !DEF: /subr/s6 ObjectEntity REAL(4)18 !DEF: /subr/s7 (Function) ProcEntity REAL(4)19 !DEF: /subr/s8 ObjectEntity REAL(4)20 real s2, s4, s6, s7, s821 !DEF: /s1 EXTERNAL (Function, Implicit) ProcEntity REAL(4)22 print *, s1(1)23 block24  !DEF: /subr/BlockConstruct1/s2 ObjectEntity INTEGER(4)25  !DEF: /subr/BlockConstruct1/s5 (Function) ProcEntity INTEGER(4)26  integer s2(10), s527  !DEF: /subr/BlockConstruct1/s4 DerivedType28  type :: s429   !DEF: /subr/BlockConstruct1/s4/n ObjectEntity INTEGER(4)30   integer :: n31  end type32  !REF: /subr/BlockConstruct1/s233  print *, s2(1)34  !DEF: /s3 EXTERNAL (Function, Implicit) ProcEntity REAL(4)35  print *, s3(1)36  !REF: /subr/BlockConstruct1/s437  print *, s4(1)38  !REF: /subr/BlockConstruct1/s539  print *, s5(1)40 end block41 block42  import, none43  !DEF: /s2 EXTERNAL (Function, Implicit) ProcEntity REAL(4)44  print *, s2(1)45 end block46 block47  !REF: /subr/s648  import, only: s649  !DEF: /s8 EXTERNAL (Function, Implicit) ProcEntity REAL(4)50  print *, s8(1)51 end block52 block53  !REF: /m54  use :: m55  !REF: /subr/s756  print *, s7(1)57 end block58 !DEF: /subr/OtherConstruct1/s2 AssocEntity REAL(4)59 associate (s2 => [1.])60  !REF: /subr/OtherConstruct1/s261  print *, s2(1)62 end associate63 !REF: /subr/da64 select type (s2 => da)65 type is (real)66  !DEF: /subr/OtherConstruct2/s2 AssocEntity REAL(4)67  print *, s2(1)68 end select69 !REF: /subr/ar70 select rank (s2 => ar)71 rank (1)72  !DEF: /subr/OtherConstruct3/s2 AssocEntity REAL(4)73  print *, s2(1)74 end select75end subroutine76