Now that semantics is working, the standard -fsyntax-only option of GNU and Clang should be used as the name of the option that causes f18 to just run the front-end. Support both options in f18, silently accepting the old option as a synonym for the new one (as preferred by the code owner), and replace all instances of the old -fparse-only option with -fsyntax-only throughout the source base. Differential Revision: https://reviews.llvm.org/D95887
20 lines
532 B
Fortran
20 lines
532 B
Fortran
! Tests -fget-symbols-sources with BLOCK that contains same variable name as
|
|
! another in an outer scope.
|
|
program main
|
|
integer :: x
|
|
integer :: y
|
|
block
|
|
integer :: x
|
|
integer :: y
|
|
x = y
|
|
end block
|
|
x = y
|
|
end program
|
|
|
|
!! Inner x
|
|
! RUN: %f18 -fget-definition 9 5 6 -fsyntax-only %s | FileCheck --check-prefix=CHECK1 %s
|
|
! CHECK1: x:{{.*}}getdefinition05.f90, 7, 16-17
|
|
!! Outer y
|
|
! RUN: %f18 -fget-definition 11 7 8 -fsyntax-only %s | FileCheck --check-prefix=CHECK2 %s
|
|
! CHECK2: y:{{.*}}getdefinition05.f90, 5, 14-15
|