Skip to content

Commit b472c6d

Browse files
committed
[flang][NFC] Strip trailing whitespace from tests (10 of N)
Only the fortran source files in flang/test have been modified. The other files in the directory will be cleaned up in subsequent commits
1 parent e5675a4 commit b472c6d

17 files changed

+191
-191
lines changed

flang/test/Parser/OpenMP/atomic-unparse.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ program main
151151
if (i .eq. j + 1) then
152152
i = j
153153
end if
154-
154+
155155
!$omp atomic compare acquire
156156
if (i .eq. j) then
157157
i = k
@@ -178,7 +178,7 @@ program main
178178
if (i .eq. k) then
179179
i = j
180180
end if
181-
181+
182182
!ATOMIC
183183
!$omp atomic
184184
i = j

flang/test/Parser/OpenMP/declare-reduction-operator.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ subroutine reduce_1 ( n, tts )
1111
real(8) :: x
1212
real(8) :: y
1313
end type
14-
14+
1515
integer :: n
1616
type(tt) :: tts(n)
1717
type(tt2) :: tts2(n)
@@ -76,7 +76,7 @@ subroutine reduce_1 ( n, tts )
7676
!PARSE-TREE: | Flags = {}
7777
!$omp declare reduction(+ : tt : omp_out = tt(omp_out%x - omp_in%x , omp_out%y - omp_in%y)) initializer(omp_priv = tt(0,0))
7878

79-
79+
8080
!CHECK: !$OMP DECLARE REDUCTION(+:tt2: omp_out = tt2(omp_out%x - omp_in%x , omp_out%y &
8181
!CHECK: !$OMP&- omp_in%y)) INITIALIZER(omp_priv = tt2(0,0))
8282

@@ -136,7 +136,7 @@ subroutine reduce_1 ( n, tts )
136136
!PARSE-TREE: | | | | | | | LiteralConstant -> IntLiteralConstant = '0'
137137
!PARSE-TREE: | Flags = {}
138138
!$omp declare reduction(+ :tt2 : omp_out = tt2(omp_out%x - omp_in%x , omp_out%y - omp_in%y)) initializer(omp_priv = tt2(0,0))
139-
139+
140140
type(tt) :: diffp = tt( 0, 0 )
141141
type(tt2) :: diffp2 = tt2( 0, 0 )
142142
integer :: i

flang/test/Parser/OpenMP/declare-variant.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ subroutine f
121121
y = 2
122122
!omp simd
123123
call f2(x, y)
124-
!omp end simd
124+
!omp end simd
125125
contains
126126
subroutine f1 (x, y)
127127
real :: x, y

flang/test/Parser/OpenMP/defaultmap-unparse.f90

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ program main
1313

1414
real :: arrA(N), arrB(N)
1515
integer, target :: arrC(N)
16-
type(data01) :: data01_a
16+
type(data01) :: data01_a
1717
integer, allocatable :: alloc_arr(:)
18-
integer, pointer :: ptrArr(:)
18+
integer, pointer :: ptrArr(:)
1919

2020
arrA = 1.414
2121
arrB = 3.14
@@ -26,8 +26,8 @@ program main
2626
alloc_arr = -1
2727

2828

29-
!CHECK: !$omp target defaultmap(tofrom:scalar)
30-
!$omp target defaultmap(tofrom:scalar)
29+
!CHECK: !$omp target defaultmap(tofrom:scalar)
30+
!$omp target defaultmap(tofrom:scalar)
3131
do i = 1, N
3232
a = 3.14
3333
enddo
@@ -66,7 +66,7 @@ program main
6666
!CHECK: !$omp target defaultmap(none:scalar)
6767
!$omp target defaultmap(none:scalar)
6868
a = 4.78
69-
!CHECK: !$omp end target
69+
!CHECK: !$omp end target
7070
!$omp end target
7171

7272
!PARSE-TREE: OmpBeginDirective
@@ -98,7 +98,7 @@ program main
9898
!PARSE-TREE: OmpClauseList -> OmpClause -> Defaultmap -> OmpDefaultmapClause
9999
!PARSE-TREE: ImplicitBehavior = Firstprivate
100100
!PARSE-TREE: Modifier -> OmpVariableCategory -> Value = Scalar
101-
101+
102102
!CHECK: !$omp target defaultmap(tofrom:aggregate)
103103
!$omp target defaultmap(tofrom:aggregate)
104104
arrC(1) = 10
@@ -113,8 +113,8 @@ program main
113113
!PARSE-TREE: OmpClauseList -> OmpClause -> Defaultmap -> OmpDefaultmapClause
114114
!PARSE-TREE: ImplicitBehavior = Tofrom
115115
!PARSE-TREE: Modifier -> OmpVariableCategory -> Value = Aggregate
116-
117-
!CHECK: !$omp target defaultmap(tofrom:allocatable)
116+
117+
!CHECK: !$omp target defaultmap(tofrom:allocatable)
118118
!$omp target defaultmap(tofrom:allocatable)
119119
alloc_arr(23) = 234
120120
!CHECK: !$omp end target
@@ -125,14 +125,14 @@ program main
125125
!PARSE-TREE: OmpClauseList -> OmpClause -> Defaultmap -> OmpDefaultmapClause
126126
!PARSE-TREE: ImplicitBehavior = Tofrom
127127
!PARSE-TREE: Modifier -> OmpVariableCategory -> Value = Allocatable
128-
128+
129129
!CHECK: !$omp target defaultmap(default:pointer)
130130
!$omp target defaultmap(default:pointer)
131131
ptrArr=>arrC
132132
ptrArr(2) = 5
133133
prtArr(200) = 34
134134
!CHECK: !$omp end target
135-
!$omp end target
135+
!$omp end target
136136

137137
!PARSE-TREE: OmpBeginDirective
138138
!PARSE-TREE: OmpDirectiveName -> llvm::omp::Directive = target

flang/test/Parser/OpenMP/if-clause-unparse.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ program if_unparse
1212
! CHECK: !$OMP TARGET UPDATE
1313
! CHECK-SAME: IF(TARGET UPDATE: cond)
1414
!$omp target update if(target update: cond)
15-
15+
1616
! CHECK: !$OMP TARGET UPDATE
1717
! CHECK-SAME: IF(TARGET UPDATE: cond)
1818
!$omp target update if(targetupdate: cond)

flang/test/Parser/OpenMP/interop-construct.f90

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! REQUIRES: openmp_runtime
2-
! RUN: %flang_fc1 -fdebug-unparse -fopenmp-version=52 %openmp_flags %s | FileCheck --ignore-case --check-prefix="UNPARSE" %s
2+
! RUN: %flang_fc1 -fdebug-unparse -fopenmp-version=52 %openmp_flags %s | FileCheck --ignore-case --check-prefix="UNPARSE" %s
33
! RUN: %flang_fc1 -fdebug-dump-parse-tree-no-sema -fopenmp-version=52 %openmp_flags %s | FileCheck --check-prefix="PARSE-TREE" %s
44

55
SUBROUTINE test_interop_01()
@@ -15,7 +15,7 @@ END SUBROUTINE test_interop_01
1515
!PARSE-TREE: | SubroutineStmt
1616
!PARSE-TREE: | | Name = 'test_interop_01'
1717
!PARSE-TREE: | SpecificationPart
18-
!PARSE-TREE: | | ImplicitPart ->
18+
!PARSE-TREE: | | ImplicitPart ->
1919
!PARSE-TREE: | ExecutionPart -> Block
2020
!PARSE-TREE: | | ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPStandaloneConstruct -> OpenMPInteropConstruct -> OmpDirectiveSpecification
2121
!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = interop
@@ -47,7 +47,7 @@ END SUBROUTINE test_interop_02
4747
!PARSE-TREE: | SpecificationPart
4848
!PARSE-TREE: | | UseStmt
4949
!PARSE-TREE: | | | Name = 'omp_lib'
50-
!PARSE-TREE: | | ImplicitPart ->
50+
!PARSE-TREE: | | ImplicitPart ->
5151
!PARSE-TREE: | | DeclarationConstruct -> SpecificationConstruct -> TypeDeclarationStmt
5252
!PARSE-TREE: | | | DeclarationTypeSpec -> IntrinsicTypeSpec -> IntegerTypeSpec -> KindSelector -> Scalar -> Integer -> Constant -> Expr -> Designator -> DataRef -> Name = 'omp_interop_kind'
5353
!PARSE-TREE: | | | EntityDecl
@@ -90,7 +90,7 @@ END SUBROUTINE test_interop_03
9090
!PARSE-TREE: | SpecificationPart
9191
!PARSE-TREE: | | UseStmt
9292
!PARSE-TREE: | | | Name = 'omp_lib'
93-
!PARSE-TREE: | | ImplicitPart ->
93+
!PARSE-TREE: | | ImplicitPart ->
9494
!PARSE-TREE: | | DeclarationConstruct -> SpecificationConstruct -> TypeDeclarationStmt
9595
!PARSE-TREE: | | | DeclarationTypeSpec -> IntrinsicTypeSpec -> IntegerTypeSpec -> KindSelector -> Scalar -> Integer -> Constant -> Expr -> Designator -> DataRef -> Name = 'omp_interop_kind'
9696
!PARSE-TREE: | | | EntityDecl
@@ -133,13 +133,13 @@ END SUBROUTINE test_interop_04
133133
!PARSE-TREE: | SpecificationPart
134134
!PARSE-TREE: | | UseStmt
135135
!PARSE-TREE: | | | Name = 'omp_lib'
136-
!PARSE-TREE: | | ImplicitPart ->
136+
!PARSE-TREE: | | ImplicitPart ->
137137
!PARSE-TREE: | | DeclarationConstruct -> SpecificationConstruct -> TypeDeclarationStmt
138138
!PARSE-TREE: | | | DeclarationTypeSpec -> IntrinsicTypeSpec -> IntegerTypeSpec -> KindSelector -> Scalar -> Integer -> Constant -> Expr -> Designator -> DataRef -> Name = 'omp_interop_kind'
139139
!PARSE-TREE: | | | EntityDecl
140140
!PARSE-TREE: | | | | Name = 'obj'
141141
!PARSE-TREE: | | DeclarationConstruct -> SpecificationConstruct -> TypeDeclarationStmt
142-
!PARSE-TREE: | | | DeclarationTypeSpec -> IntrinsicTypeSpec -> IntegerTypeSpec ->
142+
!PARSE-TREE: | | | DeclarationTypeSpec -> IntrinsicTypeSpec -> IntegerTypeSpec ->
143143
!PARSE-TREE: | | | AttrSpec -> ArraySpec -> ExplicitShapeSpec
144144
!PARSE-TREE: | | | | SpecificationExpr -> Scalar -> Integer -> Expr -> LiteralConstant -> IntLiteralConstant = '1'
145145
!PARSE-TREE: | | | ExplicitShapeSpec
@@ -185,7 +185,7 @@ END SUBROUTINE test_interop_05
185185
!PARSE-TREE: | SpecificationPart
186186
!PARSE-TREE: | | UseStmt
187187
!PARSE-TREE: | | | Name = 'omp_lib'
188-
!PARSE-TREE: | | ImplicitPart ->
188+
!PARSE-TREE: | | ImplicitPart ->
189189
!PARSE-TREE: | | DeclarationConstruct -> SpecificationConstruct -> TypeDeclarationStmt
190190
!PARSE-TREE: | | | DeclarationTypeSpec -> IntrinsicTypeSpec -> IntegerTypeSpec -> KindSelector -> Scalar -> Integer -> Constant -> Expr -> Designator -> DataRef -> Name = 'omp_interop_kind'
191191
!PARSE-TREE: | | | EntityDecl

flang/test/Parser/OpenMP/lastprivate-clause.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
! RUN: %flang_fc1 -fdebug-unparse -fopenmp -fopenmp-version=50 %s | FileCheck --ignore-case --check-prefix="UNPARSE" %s
1+
! RUN: %flang_fc1 -fdebug-unparse -fopenmp -fopenmp-version=50 %s | FileCheck --ignore-case --check-prefix="UNPARSE" %s
22
! RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp -fopenmp-version=50 %s | FileCheck --check-prefix="PARSE-TREE" %s
33

44
subroutine foo1()

flang/test/Parser/OpenMP/masked-unparse.f90

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
! RUN: %flang_fc1 -fdebug-unparse -fopenmp %s | FileCheck --ignore-case %s
22
! RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp %s | FileCheck --check-prefix="PARSE-TREE" %s
33

4-
! Check for parsing of masked directive with filter clause.
4+
! Check for parsing of masked directive with filter clause.
55

66

77
subroutine test_masked()
88
integer :: c = 1
99
!PARSE-TREE: OmpBeginDirective
1010
!PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = masked
1111
!CHECK: !$omp masked
12-
!$omp masked
12+
!$omp masked
1313
c = c + 1
1414
!$omp end masked
1515
!PARSE-TREE: OmpBeginDirective
1616
!PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = masked
1717
!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Filter -> Scalar -> Integer -> Expr = '1_4'
1818
!PARSE-TREE-NEXT: LiteralConstant -> IntLiteralConstant = '1'
1919
!CHECK: !$omp masked filter(1_4)
20-
!$omp masked filter(1)
20+
!$omp masked filter(1)
2121
c = c + 2
2222
!$omp end masked
2323
end subroutine
@@ -27,7 +27,7 @@ subroutine test_masked_taskloop_simd()
2727
!PARSE-TREE: OmpBeginLoopDirective
2828
!PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = masked taskloop simd
2929
!CHECK: !$omp masked taskloop simd
30-
!$omp masked taskloop simd
30+
!$omp masked taskloop simd
3131
do i=1,10
3232
j = j + 1
3333
end do
@@ -41,11 +41,11 @@ subroutine test_masked_taskloop
4141
!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Filter -> Scalar -> Integer -> Expr = '2_4'
4242
!PARSE-TREE-NEXT: LiteralConstant -> IntLiteralConstant = '2'
4343
!CHECK: !$omp masked taskloop filter(2_4)
44-
!$omp masked taskloop filter(2)
44+
!$omp masked taskloop filter(2)
4545
do i=1,10
4646
j = j + 1
4747
end do
48-
!$omp end masked taskloop
48+
!$omp end masked taskloop
4949
end subroutine
5050

5151
subroutine test_parallel_masked
@@ -70,7 +70,7 @@ subroutine test_parallel_masked_taskloop_simd
7070
!PARSE-TREE: OmpBeginLoopDirective
7171
!PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = parallel masked taskloop simd
7272
!CHECK: !$omp parallel masked taskloop simd
73-
!$omp parallel masked taskloop simd
73+
!$omp parallel masked taskloop simd
7474
do i=1,10
7575
j = j + 1
7676
end do
@@ -84,9 +84,9 @@ subroutine test_parallel_masked_taskloop
8484
!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Filter -> Scalar -> Integer -> Expr = '2_4'
8585
!PARSE-TREE-NEXT: LiteralConstant -> IntLiteralConstant = '2'
8686
!CHECK: !$omp parallel masked taskloop filter(2_4)
87-
!$omp parallel masked taskloop filter(2)
87+
!$omp parallel masked taskloop filter(2)
8888
do i=1,10
8989
j = j + 1
9090
end do
91-
!$omp end parallel masked taskloop
91+
!$omp end parallel masked taskloop
9292
end subroutine

flang/test/Parser/OpenMP/master-unparse.f90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ subroutine test_master()
99
!PARSE-TREE: OmpBeginDirective
1010
!PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = master
1111
!CHECK: !$omp master
12-
!$omp master
12+
!$omp master
1313
c = c + 1
1414
!$omp end master
1515
end subroutine
@@ -19,7 +19,7 @@ subroutine test_master_taskloop_simd()
1919
!PARSE-TREE: OmpBeginLoopDirective
2020
!PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = master taskloop simd
2121
!CHECK: !$omp master taskloop simd
22-
!$omp master taskloop simd
22+
!$omp master taskloop simd
2323
do i=1,10
2424
j = j + 1
2525
end do
@@ -35,7 +35,7 @@ subroutine test_master_taskloop
3535
do i=1,10
3636
j = j + 1
3737
end do
38-
!$omp end master taskloop
38+
!$omp end master taskloop
3939
end subroutine
4040

4141
subroutine test_parallel_master
@@ -53,7 +53,7 @@ subroutine test_parallel_master_taskloop_simd
5353
!PARSE-TREE: OmpBeginLoopDirective
5454
!PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = parallel master taskloop simd
5555
!CHECK: !$omp parallel master taskloop simd
56-
!$omp parallel master taskloop simd
56+
!$omp parallel master taskloop simd
5757
do i=1,10
5858
j = j + 1
5959
end do
@@ -69,5 +69,5 @@ subroutine test_parallel_master_taskloop
6969
do i=1,10
7070
j = j + 1
7171
end do
72-
!$omp end parallel master taskloop
72+
!$omp end parallel master taskloop
7373
end subroutine

flang/test/Parser/acc-data-statement.f90

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ program acc_data_test
3939
print *, "After nested data"
4040
!$acc end data
4141

42-
! Negative tests
42+
! Negative tests
4343
! Basic data construct in program body
4444
!$acc data copy(a, b) create(d) bogus()
4545
!CHECK: acc-data-statement.f90:
@@ -67,7 +67,7 @@ program acc_data_test
6767
!CHECK: acc-data-statement.f90:
6868
!CHECK-SAME: error: expected OpenACC end block directive
6969
!CHECK-NEXT: end if
70-
!CHECK-NEXT: ^
70+
!CHECK-NEXT: ^
7171
!CHECK-NEXT: in the context: OpenACC construct
7272
!CHECK-NEXT: !$acc data copyout(a)
7373
!CHECK-NEXT: ^
@@ -85,7 +85,7 @@ program acc_data_test
8585
!CHECK: acc-data-statement.f90:
8686
!CHECK-SAME: error: expected OpenACC end block directive
8787
!CHECK-NEXT: end do
88-
!CHECK-NEXT: ^
88+
!CHECK-NEXT: ^
8989
!CHECK-NEXT: in the context: OpenACC construct
9090
!CHECK-NEXT: !$acc data present(a)
9191
!CHECK-NEXT: ^
@@ -137,7 +137,7 @@ program acc_data_test
137137
contains
138138
subroutine positive_process_array(x)
139139
integer, intent(inout) :: x(:)
140-
140+
141141
! Data construct in subroutine
142142
!$acc data copy(x)
143143
x = x + 1
@@ -148,17 +148,17 @@ subroutine positive_process_array(x)
148148
function positive_compute_sum(x) result(total)
149149
integer, intent(in) :: x(:)
150150
integer :: total
151-
151+
152152
! Data construct in function
153153
!$acc data copyin(x) copy(total)
154154
total = sum(x)
155155
!$acc end data
156156
print *, "Function finished"
157157
end function
158-
158+
159159
subroutine negative_process_array(x)
160160
integer, intent(inout) :: x(:)
161-
161+
162162
! Data construct in subroutine
163163
!$acc data copy(x)
164164
x = x + 1
@@ -188,7 +188,7 @@ function negative_compute_sum(x) result(total)
188188
!CHECK: acc-data-statement.f90:
189189
!CHECK-SAME: error: expected OpenACC end block directive
190190
!CHECK-NEXT: end function
191-
!CHECK-NEXT: ^
191+
!CHECK-NEXT: ^
192192
!CHECK-NEXT: in the context: OpenACC construct
193193
!CHECK-NEXT: !$acc data copyin(x) copy(total)
194194
!CHECK-NEXT: ^

0 commit comments

Comments
 (0)