Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / getdefinition05.f90
blobc504711dc31cdd47f75a6ec38749767922926909
1 ! Tests -fget-symbols-sources with BLOCK that contains same variable name as
2 ! another in an outer scope.
3 program main
4 integer :: x
5 integer :: y
6 block
7 integer :: x
8 integer :: y
9 x = y
10 end block
11 x = y
12 end program
14 !! Inner x
15 ! RUN: %flang_fc1 -fget-definition 9 5 6 %s | FileCheck --check-prefix=CHECK1 %s
16 ! CHECK1: x:{{.*}}getdefinition05.f90, 7, 16-17
17 !! Outer y
18 ! RUN: %flang_fc1 -fget-definition 11 7 8 %s | FileCheck --check-prefix=CHECK2 %s
19 ! CHECK2: y:{{.*}}getdefinition05.f90, 5, 14-15