Skip to content

Commit cbb3be5

Browse files
authored
[flang][NFC] Strip trailing whitespace from tests (2 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 2345b7d commit cbb3be5

14 files changed

+25
-25
lines changed

flang/test/Analysis/AliasAnalysis/modref-call-globals.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ subroutine internal
7575
subroutine test_common
7676
implicit none
7777
real :: test_var_x_common
78-
common /comm/ test_var_x_common
78+
common /comm/ test_var_x_common
7979
call test_effect_external()
8080
end subroutine
8181
! CHECK-LABEL: Testing : "_QPtest_common"

flang/test/Evaluate/folding12.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module m1
55
integer :: parent_field
66
end type parent_type
77
type, extends(parent_type) :: child_type
8-
integer :: child_field
8+
integer :: child_field
99
end type child_type
1010
type parent_array_type
1111
integer, dimension(2) :: parent_field
@@ -21,7 +21,7 @@ module m1
2121
type(child_type), parameter :: child_const2 = child_type(12, 13)
2222
type(child_type), parameter :: array_var(2) = &
2323
[child_type(14, 15), child_type(16, 17)]
24-
logical, parameter :: test_array_child = array_var(2)%child_field == 17
24+
logical, parameter :: test_array_child = array_var(2)%child_field == 17
2525
logical, parameter :: test_array_parent = array_var(2)%parent_field == 16
2626

2727
type array_type
@@ -40,7 +40,7 @@ module m1
4040
type(child_array_type), parameter, dimension(2) :: child_const5 = &
4141
[child_array_type([22, 23], 24), child_array_type([25, 26], 27)]
4242
integer, dimension(2), parameter :: int_const6 = child_const5(:)%parent_field(2)
43-
logical, parameter :: test_child3 = int_const6(1) == 23
43+
logical, parameter :: test_child3 = int_const6(1) == 23
4444

4545
type(child_type), parameter :: child_const7 = child_type(28, 29)
4646
type(parent_type), parameter :: parent_const8 = child_const7%parent_type
@@ -114,7 +114,7 @@ module m3
114114
logical, parameter :: test_parent1 = child_const1%parent_field1 == 12
115115
logical, parameter :: test_parent2 = child_const1%parent_field2 == 10.0
116116
logical, parameter :: test_parent3 = child_const1%parent_field3 .eqv. .false.
117-
logical, parameter :: test_parent4 = &
117+
logical, parameter :: test_parent4 = &
118118
child_const1%parent_type%parent_field1 == 12
119119
logical, parameter :: test_parent5 = &
120120
child_const1%parent_type%parent_field2 == 10.0

flang/test/Examples/omp-in-reduction-clause.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ subroutine omp_in_reduction_taskgroup()
1515
do i=1,10
1616
z = z * 5
1717
end do
18-
!$omp end taskloop
18+
!$omp end taskloop
1919
!$omp end taskgroup
2020
end subroutine omp_in_reduction_taskgroup
2121

flang/test/Fir/CUDA/cuda-constructor-2.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<!llvm.ptr, dense<
2828
// CHECK-DAG: fir.call @_FortranACUFRegisterVariable(%[[MODULE2]], %[[VAR_ADDR2]], %[[VAR_NAME2]], %[[CST2]]) : (!fir.ref<!fir.llvm_ptr<i8>>, !fir.ref<i8>, !fir.ref<i8>, i64) -> ()
2929
// CHECK-DAG: %[[BOX:.*]] = fir.address_of(@_QMmtestsEndev) : !fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>
3030
// CHECK-DAG: %[[BOXREF:.*]] = fir.convert %[[BOX]] : (!fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>) -> !fir.ref<i8>
31-
// CHECK-DAG: fir.call @_FortranACUFRegisterVariable(%[[MODULE:.*]], %[[BOXREF]], %{{.*}}, %{{.*}})
31+
// CHECK-DAG: fir.call @_FortranACUFRegisterVariable(%[[MODULE:.*]], %[[BOXREF]], %{{.*}}, %{{.*}})
3232
//
3333

34-
// -----
34+
// -----
3535

3636
// Checking that constant global variables are not registered
3737

@@ -40,7 +40,7 @@ module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<!llvm.ptr, dense<
4040

4141
module attributes {dlti.dl_spec = #dlti.dl_spec<i8 = dense<8> : vector<2xi64>, i16 = dense<16> : vector<2xi64>, i1 = dense<8> : vector<2xi64>, !llvm.ptr = dense<64> : vector<4xi64>, f80 = dense<128> : vector<2xi64>, i128 = dense<128> : vector<2xi64>, i64 = dense<64> : vector<2xi64>, !llvm.ptr<271> = dense<32> : vector<4xi64>, !llvm.ptr<272> = dense<64> : vector<4xi64>, f128 = dense<128> : vector<2xi64>, !llvm.ptr<270> = dense<32> : vector<4xi64>, f16 = dense<16> : vector<2xi64>, f64 = dense<64> : vector<2xi64>, i32 = dense<32> : vector<2xi64>, "dlti.stack_alignment" = 128 : i64, "dlti.endianness" = "little">, fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", gpu.container_module, llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", llvm.ident = "flang version 20.0.0 (https://github.com/llvm/llvm-project.git 3372303188df0f7f8ac26e7ab610cf8b0f716d42)", llvm.target_triple = "x86_64-unknown-linux-gnu"} {
4242
fir.global @_QMiso_c_bindingECc_int constant : i32
43-
43+
4444

4545
fir.type_info @_QM__fortran_builtinsT__builtin_c_ptr noinit nodestroy nofinal : !fir.type<_QM__fortran_builtinsT__builtin_c_ptr{__address:i64}>
4646
gpu.module @cuda_device_mod {
@@ -63,7 +63,7 @@ module attributes {dlti.dl_spec = #dlti.dl_spec<i8 = dense<8> : vector<2xi64>, i
6363

6464
// -----
6565

66-
module attributes {dlti.dl_spec = #dlti.dl_spec<i8 = dense<8> : vector<2xi64>, i16 = dense<16> : vector<2xi64>, i1 = dense<8> : vector<2xi64>, !llvm.ptr = dense<64> : vector<4xi64>, f80 = dense<128> : vector<2xi64>, i128 = dense<128> : vector<2xi64>, i64 = dense<64> : vector<2xi64>, !llvm.ptr<271> = dense<32> : vector<4xi64>, !llvm.ptr<272> = dense<64> : vector<4xi64>, f128 = dense<128> : vector<2xi64>, !llvm.ptr<270> = dense<32> : vector<4xi64>, f16 = dense<16> : vector<2xi64>, f64 = dense<64> : vector<2xi64>, i32 = dense<32> : vector<2xi64>, "dlti.stack_alignment" = 128 : i64, "dlti.endianness" = "little">, fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", gpu.container_module, llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", llvm.ident = "flang version 20.0.0 (https://github.com/llvm/llvm-project.git 3372303188df0f7f8ac26e7ab610cf8b0f716d42)", llvm.target_triple = "x86_64-unknown-linux-gnu"} {
66+
module attributes {dlti.dl_spec = #dlti.dl_spec<i8 = dense<8> : vector<2xi64>, i16 = dense<16> : vector<2xi64>, i1 = dense<8> : vector<2xi64>, !llvm.ptr = dense<64> : vector<4xi64>, f80 = dense<128> : vector<2xi64>, i128 = dense<128> : vector<2xi64>, i64 = dense<64> : vector<2xi64>, !llvm.ptr<271> = dense<32> : vector<4xi64>, !llvm.ptr<272> = dense<64> : vector<4xi64>, f128 = dense<128> : vector<2xi64>, !llvm.ptr<270> = dense<32> : vector<4xi64>, f16 = dense<16> : vector<2xi64>, f64 = dense<64> : vector<2xi64>, i32 = dense<32> : vector<2xi64>, "dlti.stack_alignment" = 128 : i64, "dlti.endianness" = "little">, fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", gpu.container_module, llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", llvm.ident = "flang version 20.0.0 (https://github.com/llvm/llvm-project.git 3372303188df0f7f8ac26e7ab610cf8b0f716d42)", llvm.target_triple = "x86_64-unknown-linux-gnu"} {
6767
fir.global @_QMmEa00 {data_attr = #cuf.cuda<managed>} : !fir.box<!fir.heap<!fir.array<?x?x?x?x?xf64>>> {
6868
%c0 = arith.constant 0 : index
6969
%0 = fir.zero_bits !fir.heap<!fir.array<?x?x?x?x?xf64>>

flang/test/Fir/CUDA/cuda-implicit-device-global.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ // Test that global used in device function are flagged with the correct
144144
// Checking that a constant fir.global that is used in device code is copied over to the device
145145
// CHECK: fir.global linkonce @_QQclX5465737420504153534544 constant : !fir.char<1,11>
146146

147-
// CHECK-LABEL: gpu.module @cuda_device_mod
147+
// CHECK-LABEL: gpu.module @cuda_device_mod
148148
// CHECK: fir.global linkonce @_QQclX5465737420504153534544 constant
149149

150150
// -----
@@ -312,10 +312,10 @@ // Test that global used in device function are flagged with the correct
312312
// -----
313313

314314
// Variables with initialization are promoted to non constant global.
315-
//
315+
//
316316
// attributes(global) subroutine kernel4()
317317
// integer :: a = 4
318-
// end subroutine
318+
// end subroutine
319319

320320
func.func @_QPkernel4() attributes {cuf.proc_attr = #cuf.cuda_proc<global>} {
321321
%0 = fir.address_of(@_QFkernel4Ea) : !fir.ref<i32>

flang/test/Fir/dispatch.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ program test_type_to_class
296296
! CHECK-LABEL: _QMdispatch1Pno_pass_array_pointer
297297
! CHECK-LABEL: _QMdispatch1Pcall_a1_proc
298298

299-
! Check the layout of the binding table. This is easier to do in FIR than in
299+
! Check the layout of the binding table. This is easier to do in FIR than in
300300
! LLVM IR.
301301

302302
! BT-LABEL: fir.type_info @_QMdispatch1Tty_kindK10K20

flang/test/Fir/non-trivial-procedure-binding-description.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ end module a
2525
program main
2626
use a
2727

28-
type(f) :: obj
28+
type(f) :: obj
2929
print *, obj%foo(obj)
3030
end program

flang/test/HLFIR/assumed_shape_with_value_keyword.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ subroutine test_integer_value2(x)
3131
! CHECK: return
3232
! CHECK: }
3333

34-
subroutine test_real_value1(x)
34+
subroutine test_real_value1(x)
3535
real, value :: x(:)
3636
call internal_call3(x)
3737
end
@@ -45,7 +45,7 @@ subroutine test_real_value1(x)
4545
! CHECK: return
4646
! CHECK: }
4747

48-
subroutine test_real_value2(x)
48+
subroutine test_real_value2(x)
4949
real, value :: x(:,:)
5050
call internal_call4(x)
5151
end

flang/test/HLFIR/order_assignments/forall-proc-pointer-assignment-scheduling-character.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pure character(2) function f10()
4444

4545
integer pure function decode(c)
4646
character(2), intent(in) :: c
47-
decode = modulo(iachar(c(2:2))-49,10)+1
47+
decode = modulo(iachar(c(2:2))-49,10)+1
4848
end function
4949

5050
subroutine test_no_conflict(x)

flang/test/Integration/unroll.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
! CHECK-LABEL: unroll_dir
44
subroutine unroll_dir
55
integer :: a(10)
6-
!dir$ unroll
6+
!dir$ unroll
77
! CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}
88
! CHECK-NOT: !llvm.loop
99
! CHECK: br label {{.*}}, !llvm.loop ![[UNROLL_ENABLE_FULL_ANNO:.*]]

0 commit comments

Comments
 (0)