Skip to content

Commit 34eb0ad

Browse files
committed
[flang] Add -fsyntax-only to f18; retain -fparse-only synonym
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
1 parent 81b6987 commit 34eb0ad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+67
-67
lines changed

flang/docs/ImplementingASemanticCheck.md

Lines changed: 1 addition & 1 deletion

flang/docs/Overview.md

Lines changed: 2 additions & 2 deletions

flang/test/Evaluate/test_folding.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ temp=$1
3232
mkdir -p $temp
3333
shift
3434

35-
CMD="$* -fdebug-dump-symbols -fparse-only"
35+
CMD="$* -fdebug-dump-symbols -fsyntax-only"
3636

3737
# Check if tests should assume folding is using libpgmath
3838
if [[ $LIBPGMATH ]]; then

flang/test/Flang-Driver/parse-error.f95

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! RUN: not %flang-new -fc1 -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix=ERROR
2-
! RUN: not %f18 -parse-only %s 2>&1 | FileCheck %s --check-prefix=ERROR
2+
! RUN: not %f18 -syntax-only %s 2>&1 | FileCheck %s --check-prefix=ERROR
33

44
! REQUIRES: new-flang-driver
55

flang/test/Flang-Driver/syntax-only.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! RUN: not %flang-new -fc1 -fsyntax-only %s 2>&1 | FileCheck %s
2-
! RUN: not %f18 -fparse-only %s 2>&1 | FileCheck %s
2+
! RUN: not %f18 -fsyntax-only %s 2>&1 | FileCheck %s
33

44
! REQUIRES: new-flang-driver
55

flang/test/Frontend/prescanner-diag.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
! RUN: %flang-new -fc1 -E -I %S/Inputs/ %s 2>&1 | FileCheck %s
77

88
! Test with -fsyntax-only (i.e. ParseSyntaxOnlyAction, stops after semantic checks)
9-
! RUN: %f18 -fparse-only -I %S/Inputs/ %s 2>&1 | FileCheck %s
9+
! RUN: %f18 -fsyntax-only -I %S/Inputs/ %s 2>&1 | FileCheck %s
1010
! RUN: %flang-new -fsyntax-only -I %S/Inputs/ %s 2>&1 | FileCheck %s
1111
! RUN: %flang-new -fc1 -fsyntax-only -I %S/Inputs/ %s 2>&1 | FileCheck %s
1212

flang/test/Lower/pre-fir-tree01.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
! RUN: %f18 -fdebug-pre-fir-tree -fparse-only %s | FileCheck %s
1+
! RUN: %f18 -fdebug-pre-fir-tree -fsyntax-only %s | FileCheck %s
22

33
! Test structure of the Pre-FIR tree
44

flang/test/Lower/pre-fir-tree02.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
! RUN: %f18 -fdebug-pre-fir-tree -fparse-only %s | FileCheck %s
1+
! RUN: %f18 -fdebug-pre-fir-tree -fsyntax-only %s | FileCheck %s
22

33
! Test Pre-FIR Tree captures all the intended nodes from the parse-tree
44
! Coarray and OpenMP related nodes are tested in other files.

flang/test/Lower/pre-fir-tree03.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
! RUN: %f18 -fdebug-pre-fir-tree -fparse-only -fopenmp %s | FileCheck %s
1+
! RUN: %f18 -fdebug-pre-fir-tree -fsyntax-only -fopenmp %s | FileCheck %s
22

33
! Test Pre-FIR Tree captures OpenMP related constructs
44

flang/test/Lower/pre-fir-tree04.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
! RUN: %f18 -fdebug-pre-fir-tree -fparse-only %s | FileCheck %s
1+
! RUN: %f18 -fdebug-pre-fir-tree -fsyntax-only %s | FileCheck %s
22

33
! Test Pre-FIR Tree captures all the coarray related statements
44

flang/test/Lower/pre-fir-tree05.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
! RUN: %f18 -fdebug-pre-fir-tree -fparse-only -fopenacc %s | FileCheck %s
1+
! RUN: %f18 -fdebug-pre-fir-tree -fsyntax-only -fopenacc %s | FileCheck %s
22

33
! Test structure of the Pre-FIR tree with OpenACC construct
44

flang/test/Semantics/call17.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
! RUN: %f18 -fparse-only $s 2>&1 | FileCheck %s
1+
! RUN: %f18 -fsyntax-only $s 2>&1 | FileCheck %s
22

33
! Regression test: don't emit a bogus error about an invalid specification expression
44
! in the declaration of a binding

flang/test/Semantics/data05.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
!RUN: %f18 -fdebug-dump-symbols -fparse-only %s | FileCheck %s
1+
!RUN: %f18 -fdebug-dump-symbols -fsyntax-only %s | FileCheck %s
22
module m
33
interface
44
integer function ifunc(n)

flang/test/Semantics/data08.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
! RUN: %f18 -fdebug-dump-symbols -fparse-only %s 2>&1 | FileCheck %s
1+
! RUN: %f18 -fdebug-dump-symbols -fsyntax-only %s 2>&1 | FileCheck %s
22
! CHECK: DATA statement value initializes 'jx' of type 'INTEGER(4)' with CHARACTER
33
! CHECK: DATA statement value initializes 'jy' of type 'INTEGER(4)' with CHARACTER
44
! CHECK: DATA statement value initializes 'jz' of type 'INTEGER(4)' with CHARACTER

flang/test/Semantics/data09.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
! RUN: %f18 -fparse-only -fdebug-dump-symbols %s 2>&1 | FileCheck %s
1+
! RUN: %f18 -fsyntax-only -fdebug-dump-symbols %s 2>&1 | FileCheck %s
22
! CHECK: init:[INTEGER(4)::1065353216_4,1073741824_4,1077936128_4,1082130432_4]
33
! Verify that the closure of EQUIVALENCE'd symbols with any DATA
44
! initialization produces a combined initializer.

flang/test/Semantics/empty.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
! RUN: %f18 -fparse-only %s
1+
! RUN: %f18 -fsyntax-only %s
22
! RUN: rm -rf %t && mkdir %t
33
! RUN: touch %t/empty.f90
4-
! RUN: %f18 -fparse-only %t/empty.f90
4+
! RUN: %f18 -fsyntax-only %t/empty.f90

flang/test/Semantics/final02.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
!RUN: %f18 -fparse-only %s 2>&1 | FileCheck %s
1+
!RUN: %f18 -fsyntax-only %s 2>&1 | FileCheck %s
22
module m
33
type :: t1
44
integer :: n

flang/test/Semantics/getdefinition01.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ recursive pure function f() result(x)
1616
end module
1717

1818
! RUN and CHECK lines at the bottom as this test is sensitive to line numbers
19-
! RUN: %f18 -fget-definition 6 17 18 -fparse-only %s | FileCheck --check-prefix=CHECK1 %s
20-
! RUN: %f18 -fget-definition 7 20 23 -fparse-only %s | FileCheck --check-prefix=CHECK2 %s
21-
! RUN: %f18 -fget-definition 14 3 4 -fparse-only %s | FileCheck --check-prefix=CHECK3 %s
19+
! RUN: %f18 -fget-definition 6 17 18 -fsyntax-only %s | FileCheck --check-prefix=CHECK1 %s
20+
! RUN: %f18 -fget-definition 7 20 23 -fsyntax-only %s | FileCheck --check-prefix=CHECK2 %s
21+
! RUN: %f18 -fget-definition 14 3 4 -fsyntax-only %s | FileCheck --check-prefix=CHECK3 %s
2222
! CHECK1: x:{{.*}}getdefinition01.f90, 5, 21-22
2323
! CHECK2: yyy:{{.*}}getdefinition01.f90, 5, 24-27
2424
! CHECK3: x:{{.*}}getdefinition01.f90, 13, 24-25
2525

26-
! RUN: not %f18 -fget-definition -fparse-only %s 2>&1 | FileCheck --check-prefix=CHECK-ERROR %s
26+
! RUN: not %f18 -fget-definition -fsyntax-only %s 2>&1 | FileCheck --check-prefix=CHECK-ERROR %s
2727
! CHECK-ERROR: Invalid argument to -fget-definitions

flang/test/Semantics/getdefinition02.f

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ recursive pure function f() result(x)
1717
end module
1818

1919
! RUN and CHECK lines here as test is sensitive to line numbers
20-
! RUN: %f18 -fget-definition 7 9 10 -fparse-only %s 2>&1 | FileCheck --check-prefix=CHECK1 %s
21-
! RUN: %f18 -fget-definition 8 26 29 -fparse-only %s 2>&1 | FileCheck --check-prefix=CHECK2 %s
22-
! RUN: %f18 -fget-definition 15 9 10 -fparse-only %s 2>&1 | FileCheck --check-prefix=CHECK3 %s
20+
! RUN: %f18 -fget-definition 7 9 10 -fsyntax-only %s 2>&1 | FileCheck --check-prefix=CHECK1 %s
21+
! RUN: %f18 -fget-definition 8 26 29 -fsyntax-only %s 2>&1 | FileCheck --check-prefix=CHECK2 %s
22+
! RUN: %f18 -fget-definition 15 9 10 -fsyntax-only %s 2>&1 | FileCheck --check-prefix=CHECK3 %s
2323
! CHECK1: x:{{.*}}getdefinition02.f, 5, 27-28
2424
! CHECK2: yyy:{{.*}}getdefinition02.f, 5, 30-33
2525
! CHECK3: x:{{.*}}getdefinition02.f, 14, 30-31

flang/test/Semantics/getdefinition03-a.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ program main
77
x = f
88
end program
99

10-
! RUN: %f18 -fget-definition 7 6 7 -fparse-only %s | FileCheck --check-prefix=CHECK1 %s
11-
! RUN: %f18 -fget-definition 7 2 3 -fparse-only %s | FileCheck --check-prefix=CHECK2 %s
10+
! RUN: %f18 -fget-definition 7 6 7 -fsyntax-only %s | FileCheck --check-prefix=CHECK1 %s
11+
! RUN: %f18 -fget-definition 7 2 3 -fsyntax-only %s | FileCheck --check-prefix=CHECK2 %s
1212
! CHECK1: f:{{.*}}getdefinition03-b.f90, 2, 12-13
1313
! CHECK2: x:{{.*}}getdefinition03-a.f90, 6, 13-14

flang/test/Semantics/getdefinition04.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ program main
66
x = y
77
end program
88

9-
! RUN: %f18 -fget-definition 6 3 4 -fparse-only %s | FileCheck %s
9+
! RUN: %f18 -fget-definition 6 3 4 -fsyntax-only %s | FileCheck %s
1010
! CHECK: x:{{.*}}getdefinition04.f90, 3, 14-15

flang/test/Semantics/getdefinition05.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ program main
1212
end program
1313

1414
!! Inner x
15-
! RUN: %f18 -fget-definition 9 5 6 -fparse-only %s | FileCheck --check-prefix=CHECK1 %s
15+
! RUN: %f18 -fget-definition 9 5 6 -fsyntax-only %s | FileCheck --check-prefix=CHECK1 %s
1616
! CHECK1: x:{{.*}}getdefinition05.f90, 7, 16-17
1717
!! Outer y
18-
! RUN: %f18 -fget-definition 11 7 8 -fparse-only %s | FileCheck --check-prefix=CHECK2 %s
18+
! RUN: %f18 -fget-definition 11 7 8 -fsyntax-only %s | FileCheck --check-prefix=CHECK2 %s
1919
! CHECK2: y:{{.*}}getdefinition05.f90, 5, 14-15

flang/test/Semantics/getsymbols01.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ recursive pure function f() result(x)
1515
end function
1616
end module
1717

18-
! RUN: %f18 -fget-symbols-sources -fparse-only %s 2>&1 | FileCheck %s
18+
! RUN: %f18 -fget-symbols-sources -fsyntax-only %s 2>&1 | FileCheck %s
1919
! CHECK-COUNT-1:f:{{.*}}getsymbols01.f90, 12, 26-27
2020
! CHECK-COUNT-1:mm1:{{.*}}getsymbols01.f90, 2, 8-11
2121
! CHECK-COUNT-1:s:{{.*}}getsymbols01.f90, 5, 18-19

flang/test/Semantics/getsymbols02.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ PROGRAM helloworld
77
i = callget5()
88
ENDPROGRAM
99

10-
! RUN: %f18 -fparse-only %S/Inputs/getsymbols02-a.f90
11-
! RUN: %f18 -fparse-only %S/Inputs/getsymbols02-b.f90
12-
! RUN: %f18 -fget-symbols-sources -fparse-only %s 2>&1 | FileCheck %s
10+
! RUN: %f18 -fsyntax-only %S/Inputs/getsymbols02-a.f90
11+
! RUN: %f18 -fsyntax-only %S/Inputs/getsymbols02-b.f90
12+
! RUN: %f18 -fget-symbols-sources -fsyntax-only %s 2>&1 | FileCheck %s
1313
! CHECK: callget5: .{{[/\\]}}mm2b.mod,
1414
! CHECK: get5: .{{[/\\]}}mm2a.mod,

flang/test/Semantics/getsymbols03-a.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ program main
77
x = f
88
end program
99

10-
! RUN: %f18 -fget-symbols-sources -fparse-only %s 2>&1 | FileCheck %s
10+
! RUN: %f18 -fget-symbols-sources -fsyntax-only %s 2>&1 | FileCheck %s
1111
! CHECK:f:{{.*}}getsymbols03-b.f90, 2, 12-13
1212
! CHECK:main:{{.*}}getsymbols03-a.f90, 4, 9-13
1313
! CHECK:mm3:{{.*}}getsymbols03-a.f90, 5, 6-9

flang/test/Semantics/getsymbols04.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ program main
66
x = y
77
end program
88

9-
! RUN: %f18 -fget-symbols-sources -fparse-only %s 2>&1 | FileCheck %s
9+
! RUN: %f18 -fget-symbols-sources -fsyntax-only %s 2>&1 | FileCheck %s
1010
! CHECK:x:{{.*}}getsymbols04.f90, 3, 14-15
1111
! CHECK:x:{{.*}}getsymbols04.f90, 5, 11-12
1212
! CHECK:y:{{.*}}getsymbols04.f90, 4, 14-15

flang/test/Semantics/getsymbols05.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ program main
99
x = y
1010
end program
1111

12-
! RUN: %f18 -fget-symbols-sources -fparse-only %s 2>&1 | FileCheck %s
12+
! RUN: %f18 -fget-symbols-sources -fsyntax-only %s 2>&1 | FileCheck %s
1313
! CHECK:x:{{.*}}getsymbols05.f90, 3, 14-15
1414
! CHECK:x:{{.*}}getsymbols05.f90, 6, 16-17
1515
! CHECK:y:{{.*}}getsymbols05.f90, 4, 14-15
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
! RUN: echo -n "end program" > %t.f90
2-
! RUN: %f18 -fparse-only %t.f90
2+
! RUN: %f18 -fsyntax-only %t.f90
33
! RUN: echo -ne "\rend program" > %t.f90
4-
! RUN: %f18 -fparse-only %t.f90
4+
! RUN: %f18 -fsyntax-only %t.f90

flang/test/Semantics/mod-file-rewriter.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
! RUN: rm -fr %t && mkdir %t && cd %t
2-
! RUN: %f18 -fparse-only -fdebug-module-writer %s 2>&1 | FileCheck %s --check-prefix CHECK_CHANGED
3-
! RUN: %f18 -fparse-only -fdebug-module-writer %s 2>&1 | FileCheck %s --check-prefix CHECK_UNCHANGED
4-
! RUN: %f18 -fparse-only -fdebug-module-writer %p/Inputs/mod-file-unchanged.f90 2>&1 | FileCheck %s --check-prefix CHECK_UNCHANGED
5-
! RUN: %f18 -fparse-only -fdebug-module-writer %p/Inputs/mod-file-changed.f90 2>&1 | FileCheck %s --check-prefix CHECK_CHANGED
2+
! RUN: %f18 -fsyntax-only -fdebug-module-writer %s 2>&1 | FileCheck %s --check-prefix CHECK_CHANGED
3+
! RUN: %f18 -fsyntax-only -fdebug-module-writer %s 2>&1 | FileCheck %s --check-prefix CHECK_UNCHANGED
4+
! RUN: %f18 -fsyntax-only -fdebug-module-writer %p/Inputs/mod-file-unchanged.f90 2>&1 | FileCheck %s --check-prefix CHECK_UNCHANGED
5+
! RUN: %f18 -fsyntax-only -fdebug-module-writer %p/Inputs/mod-file-changed.f90 2>&1 | FileCheck %s --check-prefix CHECK_CHANGED
66

77
module m
88
real :: x(10)

flang/test/Semantics/modifiable01.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
! RUN: not %f18 -fparse-only %s 2>&1 | FileCheck %s
1+
! RUN: not %f18 -fsyntax-only %s 2>&1 | FileCheck %s
22
! Test WhyNotModifiable() explanations
33

44
module prot

flang/test/Semantics/offsets01.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
!RUN: %f18 -fdebug-dump-symbols -fparse-only %s | FileCheck %s
1+
!RUN: %f18 -fdebug-dump-symbols -fsyntax-only %s | FileCheck %s
22

33
! Size and alignment of intrinsic types
44
subroutine s1

flang/test/Semantics/offsets02.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
!RUN: %f18 -fdebug-dump-symbols -fparse-only %s | FileCheck %s
1+
!RUN: %f18 -fdebug-dump-symbols -fsyntax-only %s | FileCheck %s
22

33
! Size and alignment of derived types
44

flang/test/Semantics/offsets03.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
!RUN: %f18 -fdebug-dump-symbols -fparse-only %s | FileCheck %s
1+
!RUN: %f18 -fdebug-dump-symbols -fsyntax-only %s | FileCheck %s
22

33
! Size and alignment with EQUIVALENCE and COMMON
44

flang/test/Semantics/oldparam01.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
! RUN: %f18 -falternative-parameter-statement -fdebug-dump-symbols -fparse-only %s 2>&1 | FileCheck %s
1+
! RUN: %f18 -falternative-parameter-statement -fdebug-dump-symbols -fsyntax-only %s 2>&1 | FileCheck %s
22

33
! Non-error tests for "old style" PARAMETER statements
44

flang/test/Semantics/oldparam02.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
! RUN: not %f18 -falternative-parameter-statement -fdebug-dump-symbols -fparse-only %s 2>&1 | FileCheck %s
1+
! RUN: not %f18 -falternative-parameter-statement -fdebug-dump-symbols -fsyntax-only %s 2>&1 | FileCheck %s
22

33
! Error tests for "old style" PARAMETER statements
44
subroutine subr(x1,x2,x3,x4,x5)

flang/test/Semantics/oldparam03.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
! RUN: not %f18 -fparse-only %s 2>&1 | FileCheck %s
1+
! RUN: not %f18 -fsyntax-only %s 2>&1 | FileCheck %s
22

33
! Ensure that old-style PARAMETER statements are disabled by default.
44

flang/test/Semantics/resolve100.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
!RUN: %f18 -fdebug-dump-symbols -fparse-only %s | FileCheck %s
1+
!RUN: %f18 -fdebug-dump-symbols -fsyntax-only %s | FileCheck %s
22

33
program p
44
! CHECK: a size=4 offset=0: ObjectEntity type: LOGICAL(4)

flang/test/Semantics/rewrite01.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
! RUN: %f18 -fparse-only -fdebug-dump-parse-tree %s 2>&1 | FileCheck %s
1+
! RUN: %f18 -fsyntax-only -fdebug-dump-parse-tree %s 2>&1 | FileCheck %s
22
! Ensure that READ(CVAR) [, item-list] is corrected when CVAR is a
33
! character variable so as to be a formatted read from the default
44
! unit, not an unformatted read from an internal unit (which is not

flang/test/Semantics/test_errors.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Compile a source file and check errors against those listed in the file.
33
# Change the compiler by setting the F18 environment variable.
44

5-
F18_OPTIONS="-fparse-only"
5+
F18_OPTIONS="-fsyntax-only"
66
srcdir=$(dirname $0)
77
source $srcdir/common.sh
88
[[ ! -f $src ]] && die "File not found: $src"

flang/test/Semantics/test_modfile.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Compile a source file and compare generated .mod files against expected.
33

44
set -e
5-
F18_OPTIONS="-fdebug-resolve-names -fparse-only"
5+
F18_OPTIONS="-fdebug-resolve-names -fsyntax-only"
66
srcdir=$(dirname $0)
77
source $srcdir/common.sh
88

flang/test/Semantics/typeinfo01.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
!RUN: %f18 -fdebug-dump-symbols -fparse-only %s | FileCheck %s
1+
!RUN: %f18 -fdebug-dump-symbols -fsyntax-only %s | FileCheck %s
22
! Tests for derived type runtime descriptions
33

44
module m01

flang/tools/f18-parse-demo/f18-parse-demo.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ struct DriverOptions {
8787
bool warnOnNonstandardUsage{false}; // -Mstandard
8888
bool warningsAreErrors{false}; // -Werror
8989
Fortran::parser::Encoding encoding{Fortran::parser::Encoding::LATIN_1};
90-
bool parseOnly{false};
90+
bool syntaxOnly{false};
9191
bool dumpProvenance{false};
9292
bool dumpCookedChars{false};
9393
bool dumpUnparse{false};
@@ -217,7 +217,7 @@ std::string CompileFortran(
217217
Fortran::common::LanguageFeature::BackslashEscapes));
218218
return {};
219219
}
220-
if (driver.parseOnly) {
220+
if (driver.syntaxOnly) {
221221
return {};
222222
}
223223

@@ -369,8 +369,8 @@ int main(int argc, char *const argv[]) {
369369
driver.dumpUnparse = true;
370370
} else if (arg == "-ftime-parse") {
371371
driver.timeParse = true;
372-
} else if (arg == "-fparse-only") {
373-
driver.parseOnly = true;
372+
} else if (arg == "-fparse-only" || arg == "-fsyntax-only") {
373+
driver.syntaxOnly = true;
374374
} else if (arg == "-c") {
375375
driver.compileOnly = true;
376376
} else if (arg == "-o") {
@@ -405,7 +405,7 @@ int main(int argc, char *const argv[]) {
405405
<< " -ed enable fixed form D lines\n"
406406
<< " -E prescan & preprocess only\n"
407407
<< " -ftime-parse measure parsing time\n"
408-
<< " -fparse-only parse only, no output except messages\n"
408+
<< " -fsyntax-only parse only, no output except messages\n"
409409
<< " -funparse parse & reformat only, no code "
410410
"generation\n"
411411
<< " -fdump-provenance dump the provenance table (no code)\n"

flang/tools/f18/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ foreach(filename ${MODULES})
4646
set(depends ${include}/__fortran_builtins.mod)
4747
endif()
4848
add_custom_command(OUTPUT ${include}/${filename}.mod
49-
COMMAND f18 -fparse-only -I${include}
49+
COMMAND f18 -fsyntax-only -I${include}
5050
${FLANG_SOURCE_DIR}/module/${filename}.f90
5151
WORKING_DIRECTORY ${include}
5252
DEPENDS f18 ${FLANG_SOURCE_DIR}/module/${filename}.f90 ${depends}

0 commit comments

Comments
 (0)