brintos

brintos / llvm-project-archived public Read only

0
0
Text · 820 B · 4866723 Raw
25 lines · plain
1! Tests -fget-definition returning source position of symbol definition.2module m13 private :: f4contains5 pure subroutine s (x, yyy) bind(c)6  intent(in) :: x7  intent(inout) :: yyy8 contains9  pure subroutine ss10  end subroutine11 end subroutine12 recursive pure function f() result(x)13  real, allocatable :: x14  x = 1.015 end function16end module17 18! RUN and CHECK lines at the bottom as this test is sensitive to line numbers19! RUN: %flang_fc1 -fget-definition 6 17 18 %s | FileCheck --check-prefix=CHECK1 %s20! RUN: %flang_fc1 -fget-definition 7 20 23 %s | FileCheck --check-prefix=CHECK2 %s21! RUN: %flang_fc1 -fget-definition 14 3 4 %s | FileCheck --check-prefix=CHECK3 %s22! CHECK1: x:{{.*}}getdefinition01.f90, 5, 21-2223! CHECK2: yyy:{{.*}}getdefinition01.f90, 5, 24-2724! CHECK3: x:{{.*}}getdefinition01.f90, 13, 24-2525