[flang-commits] [flang] [flang][NFC] Strip trailing whitespace from tests (7 of N) (PR #168562)

Tarun Prabhu via flang-commits flang-commits at lists.llvm.org
Tue Nov 18 08:26:19 PST 2025


https://github.com/tarunprabhu created https://github.com/llvm/llvm-project/pull/168562

Only some fortran source files in flang/test/Lower have been modified. The other files in the directory will be cleaned up in subsequent commits

>From 0d84f96688762c2df1f0af527780250d95c3d4a5 Mon Sep 17 00:00:00 2001
From: Tarun Prabhu <tarun at lanl.gov>
Date: Wed, 5 Nov 2025 08:35:17 -0700
Subject: [PATCH] [flang][NFC] Strip trailing whitespace from tests (7 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
---
 flang/test/Lower/assignment.f90                |  6 +++---
 flang/test/Lower/assumed-shape-callee.f90      |  2 +-
 flang/test/Lower/assumed-shape-caller.f90      |  2 +-
 flang/test/Lower/big-integer-parameter.f90     |  2 +-
 flang/test/Lower/c-interoperability.f90        |  2 +-
 flang/test/Lower/call-copy-in-out.f90          |  4 ++--
 flang/test/Lower/charconvert.f90               | 18 +++++++++---------
 flang/test/Lower/control-flow.f90              |  2 +-
 flang/test/Lower/default-initialization.f90    | 18 +++++++++---------
 .../Lower/derived-allocatable-components.f90   | 12 ++++++------
 flang/test/Lower/derived-type-descriptor.f90   |  2 +-
 flang/test/Lower/derived-types.f90             |  8 ++++----
 flang/test/Lower/dispatch.f90                  | 14 +++++++-------
 .../Lower/do_concurrent_delayed_locality.f90   |  2 +-
 flang/test/Lower/do_concurrent_reduce.f90      |  2 +-
 flang/test/Lower/do_loop.f90                   |  2 +-
 flang/test/Lower/dummy-argument-contiguous.f90 |  2 +-
 flang/test/Lower/dummy-procedure-character.f90 |  2 +-
 flang/test/Lower/dummy-procedure.f90           |  2 +-
 flang/test/Lower/equivalence-1.f90             |  2 +-
 flang/test/Lower/equivalence-2.f90             |  2 +-
 .../test/Lower/explicit-interface-results.f90  |  4 ++--
 flang/test/Lower/host-associated.f90           | 12 ++++++------
 23 files changed, 62 insertions(+), 62 deletions(-)

diff --git a/flang/test/Lower/assignment.f90 b/flang/test/Lower/assignment.f90
index defeec5b7edfe..94d11da118e6b 100644
--- a/flang/test/Lower/assignment.f90
+++ b/flang/test/Lower/assignment.f90
@@ -26,7 +26,7 @@ subroutine sub2(a, b)
 integer function negi(a)
   integer :: a
   negi = -a
-end 
+end
 
 ! CHECK-LABEL: func @_QPnegi(
 ! CHECK-SAME:    %[[A:.*]]: !fir.ref<i32> {fir.bindc_name = "a"}) -> i32 {
@@ -41,7 +41,7 @@ integer function negi(a)
 real function negr(a)
   real :: a
   negr = -a
-end 
+end
 
 ! CHECK-LABEL: func @_QPnegr(
 ! CHECK-SAME:    %[[A:.*]]: !fir.ref<f32> {fir.bindc_name = "a"}) -> f32 {
@@ -55,7 +55,7 @@ real function negr(a)
 complex function negc(a)
   complex :: a
   negc = -a
-end 
+end
 
 ! CHECK-LABEL: func @_QPnegc(
 ! CHECK-SAME:    %[[A:.*]]: !fir.ref<complex<f32>> {fir.bindc_name = "a"}) -> complex<f32> {
diff --git a/flang/test/Lower/assumed-shape-callee.f90 b/flang/test/Lower/assumed-shape-callee.f90
index a40ee109d51f3..69abf05139af0 100644
--- a/flang/test/Lower/assumed-shape-callee.f90
+++ b/flang/test/Lower/assumed-shape-callee.f90
@@ -8,7 +8,7 @@
 ! of making a new fir.box and this would break all these tests. In fact, for non
 ! contiguous arrays, this is the case. Find a better way to tests symbol lowering/mapping.
 
-! CHECK-LABEL: func @_QPtest_assumed_shape_1(%arg0: !fir.box<!fir.array<?xi32>> {fir.bindc_name = "x", fir.contiguous}) 
+! CHECK-LABEL: func @_QPtest_assumed_shape_1(%arg0: !fir.box<!fir.array<?xi32>> {fir.bindc_name = "x", fir.contiguous})
 subroutine test_assumed_shape_1(x)
   integer, contiguous :: x(:)
   ! CHECK: %[[addr:.*]] = fir.box_addr %arg0 : (!fir.box<!fir.array<?xi32>>) -> !fir.ref<!fir.array<?xi32>>
diff --git a/flang/test/Lower/assumed-shape-caller.f90 b/flang/test/Lower/assumed-shape-caller.f90
index 5277dc76aa54b..5a289e61bd210 100644
--- a/flang/test/Lower/assumed-shape-caller.f90
+++ b/flang/test/Lower/assumed-shape-caller.f90
@@ -59,7 +59,7 @@ subroutine takes_box(y)
     end subroutine
   end interface
   integer :: v(:)
-  real :: x(:) 
+  real :: x(:)
   call takes_box(x(v))
 ! CHECK:  %[[VAL_2:.*]] = arith.constant 1 : index
 ! CHECK:  %[[VAL_3:.*]] = arith.constant 0 : index
diff --git a/flang/test/Lower/big-integer-parameter.f90 b/flang/test/Lower/big-integer-parameter.f90
index ca90b8adfb318..b991dd9bc2c64 100644
--- a/flang/test/Lower/big-integer-parameter.f90
+++ b/flang/test/Lower/big-integer-parameter.f90
@@ -31,7 +31,7 @@ program i128
 
 ! CHECK-LABEL: fir.global internal @_QFECx constant : i128 {
 ! CHECK-NEXT:   %{{.*}} = arith.constant 9223372036854775808 : i128
- 
+
 ! CHECK-LABEL: fir.global internal @_QFECy constant : i128 {
 ! CHECK-NEXT: %{{.*}} = arith.constant -9223372036854775809 : i128
 
diff --git a/flang/test/Lower/c-interoperability.f90 b/flang/test/Lower/c-interoperability.f90
index cbd6c1f53f6f1..613f8747aa5f6 100644
--- a/flang/test/Lower/c-interoperability.f90
+++ b/flang/test/Lower/c-interoperability.f90
@@ -26,7 +26,7 @@ module c_interoperability_test
   end type thing_with_pointer
 
   type(thing_with_pointer) :: this_thing
-  
+
 contains
   function get_a_thing()
     type(thing_with_pointer) :: get_a_thing
diff --git a/flang/test/Lower/call-copy-in-out.f90 b/flang/test/Lower/call-copy-in-out.f90
index 1eb2c3ffc0b0e..65141dcb7c5fe 100644
--- a/flang/test/Lower/call-copy-in-out.f90
+++ b/flang/test/Lower/call-copy-in-out.f90
@@ -120,7 +120,7 @@ subroutine bar_intent_out(x)
 ! CHECK:  %[[cast:.*]] = fir.convert %[[addr]] : (!fir.heap<!fir.array<?xf32>>) -> !fir.ref<!fir.array<100xf32>>
 ! CHECK:  fir.call @_QPbar_intent_out(%[[cast]]) {{.*}}: (!fir.ref<!fir.array<100xf32>>) -> ()
   call bar_intent_out(x)
-  
+
 ! CHECK: fir.if %[[not_contiguous]]
 ! CHECK: fir.call @_FortranACopyOutAssign
 ! CHECK: return
@@ -224,7 +224,7 @@ subroutine test_char(x)
 ! CHECK:             %[[VAL_32:.*]] = fir.convert %[[TMP_BOX_REF]] : (!fir.ref<!fir.box<!fir.heap<!fir.array<?x!fir.char<1,10>>>>>) -> !fir.ref<!fir.box<none>>
 ! CHECK:             fir.call @_FortranACopyOutAssign(%[[VAL_31]], %[[VAL_32]], %{{.*}}, %{{.*}}) fastmath<contract> : (!fir.ref<!fir.box<none>>, !fir.ref<!fir.box<none>>, !fir.ref<i8>, i32) -> ()
 ! CHECK:           }
-  
+
   character(10) :: x(:)
   call bar_char(x)
   ! CHECK:         return
diff --git a/flang/test/Lower/charconvert.f90 b/flang/test/Lower/charconvert.f90
index bacf9a9626a7d..1cf255252344b 100644
--- a/flang/test/Lower/charconvert.f90
+++ b/flang/test/Lower/charconvert.f90
@@ -1,17 +1,17 @@
 ! RUN: bbc -emit-hlfir %s -o - | FileCheck %s
 
 subroutine test_c1_to_c4(c4, c1)
-  character(len=*, kind=4) :: c4                           
-  character(len=*, kind=1) :: c1            
-  c4 = c1                                         
-end subroutine                                           
+  character(len=*, kind=4) :: c4
+  character(len=*, kind=1) :: c1
+  c4 = c1
+end subroutine
 
 subroutine test_c4_to_c1(c4, c1)
-  character(len=*, kind=4) :: c4                           
-  character(len=*, kind=1) :: c1            
-  c1 = c4                                         
-end subroutine                                           
-                                                
+  character(len=*, kind=4) :: c4
+  character(len=*, kind=1) :: c1
+  c1 = c4
+end subroutine
+
 ! CHECK: func.func @_QPtest_c1_to_c4(%[[ARG0:.*]]: !fir.boxchar<4> {fir.bindc_name = "c4"}, %[[ARG1:.*]]: !fir.boxchar<1> {fir.bindc_name = "c1"}) {
 ! CHECK:   %[[VAL_0:.*]]:2 = fir.unboxchar %[[ARG1]] : (!fir.boxchar<1>) -> (!fir.ref<!fir.char<1,?>>, index)
 ! CHECK:   %[[VAL_1:.*]]:2 = hlfir.declare %[[VAL_0]]#0 typeparams %[[VAL_0]]#1 dummy_scope %{{[0-9]+}} arg {{[0-9]+}} {uniq_name = "_QFtest_c1_to_c4Ec1"} : (!fir.ref<!fir.char<1,?>>, index, !fir.dscope) -> (!fir.boxchar<1>, !fir.ref<!fir.char<1,?>>)
diff --git a/flang/test/Lower/control-flow.f90 b/flang/test/Lower/control-flow.f90
index ef66c9e22c8d1..b1929b03c87f9 100644
--- a/flang/test/Lower/control-flow.f90
+++ b/flang/test/Lower/control-flow.f90
@@ -22,4 +22,4 @@ subroutine one(a,b,c)
  ! CHECK: ^bb[[EXIT]]:
  ! CHECK-NEXT: return
 end subroutine one
-    
+
diff --git a/flang/test/Lower/default-initialization.f90 b/flang/test/Lower/default-initialization.f90
index 7b93db43613f1..750c504362ee7 100644
--- a/flang/test/Lower/default-initialization.f90
+++ b/flang/test/Lower/default-initialization.f90
@@ -3,14 +3,14 @@
 
 module test_dinit
   type t
-    integer :: i = 42 
+    integer :: i = 42
   end type
   type t_alloc_comp
     real, allocatable :: i(:)
   end type
   type tseq
     sequence
-    integer :: i = 42 
+    integer :: i = 42
   end type
 contains
 
@@ -26,7 +26,7 @@ subroutine local
     !CHECK: fir.copy %[[ADDR]] to %[[x]] no_overlap : !fir.ref<!fir.type<_QMtest_dinitTt{i:i32}>>, !fir.ref<!fir.type<_QMtest_dinitTt{i:i32}>>
     type(t) :: x
     print *, x%i
-  end subroutine 
+  end subroutine
 
   ! Test local array is default initialized
   ! CHECK-LABEL: func @_QMtest_dinitPlocal_array()
@@ -38,7 +38,7 @@ subroutine local_array()
     ! CHECK: fir.call @_FortranAInitialize(%[[xboxNone]], %{{.*}}, %{{.*}}) {{.*}}: (!fir.box<none>, !fir.ref<i8>, i32) -> ()
     type(t) :: x(4)
     print *, x(2)%i
-  end subroutine 
+  end subroutine
 
   ! Test allocatable component triggers default initialization of local
   ! scalars.
@@ -48,7 +48,7 @@ subroutine local_alloc_comp
     !CHECK: %[[ADDR:.*]] = fir.address_of(@_QQ_QMtest_dinitTt_alloc_comp.DerivedInit) : !fir.ref<!fir.type<_QMtest_dinitTt_alloc_comp{i:!fir.box<!fir.heap<!fir.array<?xf32>>>}>>
     !CHECK: fir.copy %[[ADDR]] to %[[x]] no_overlap : !fir.ref<!fir.type<_QMtest_dinitTt_alloc_comp{i:!fir.box<!fir.heap<!fir.array<?xf32>>>}>>, !fir.ref<!fir.type<_QMtest_dinitTt_alloc_comp{i:!fir.box<!fir.heap<!fir.array<?xf32>>>}>>
     type(t_alloc_comp) :: x
-  end subroutine 
+  end subroutine
 
   ! Test function results are default initialized.
   ! CHECK-LABEL: func @_QMtest_dinitPresult() -> !fir.type<_QMtest_dinitTt{i:i32}>
@@ -110,7 +110,7 @@ subroutine local_eq2()
     ! CHECK: %[[ADDR:.*]] = fir.address_of(@_QQ_QMtest_dinitTtseq.DerivedInit) : !fir.ref<!fir.type<_QMtest_dinitTtseq{i:i32}>>
     ! CHECK: fir.copy %[[ADDR]] to %[[x]] no_overlap : !fir.ref<!fir.type<_QMtest_dinitTtseq{i:i32}>>, !fir.ptr<!fir.type<_QMtest_dinitTtseq{i:i32}>>
 
-  
+
     ! CHECK: %[[ycoor:.*]] = fir.coordinate_of %[[equiv]], %c0{{.*}} : (!fir.ref<!fir.array<4xi8>>, index) -> !fir.ref<i8>
     ! CHECK: %[[y:.*]] = fir.convert %[[ycoor]] : (!fir.ref<i8>) -> !fir.ptr<!fir.type<_QMtest_dinitTtseq{i:i32}>>
     ! CHECK: %[[ADDR:.*]] = fir.address_of(@_QQ_QMtest_dinitTtseq.DerivedInit) : !fir.ref<!fir.type<_QMtest_dinitTtseq{i:i32}>>
@@ -129,14 +129,14 @@ subroutine noinit_local_alloc
     ! CHECK-NOT: fir.call @_FortranAInitialize
     type(t), allocatable :: x
     ! CHECK: return
-  end subroutine 
+  end subroutine
 
   ! CHECK-LABEL: func @_QMtest_dinitPnoinit_local_pointer
   subroutine noinit_local_pointer
     ! CHECK-NOT: fir.call @_FortranAInitialize
     type(t), pointer :: x
     ! CHECK: return
-  end subroutine 
+  end subroutine
 
   ! CHECK-LABEL: func @_QMtest_dinitPnoinit_normal_dummy
   subroutine noinit_normal_dummy(x)
@@ -150,7 +150,7 @@ subroutine noinit_intentinout_dummy(x)
     ! CHECK-NOT: fir.call @_FortranAInitialize
     type(t), intent(inout) :: x
     ! CHECK: return
-  end subroutine 
+  end subroutine
 
 
   subroutine test_pointer_intentout(a, b)
diff --git a/flang/test/Lower/derived-allocatable-components.f90 b/flang/test/Lower/derived-allocatable-components.f90
index 1debb275d6276..bc508fb9470ae 100644
--- a/flang/test/Lower/derived-allocatable-components.f90
+++ b/flang/test/Lower/derived-allocatable-components.f90
@@ -241,9 +241,9 @@ subroutine ref_scalar_def_char_a(a0_0, a1_0, a0_1, a1_1)
   ! CHECK-DAG: %[[len:.*]] = fir.box_elesize %[[box]]
   ! CHECK-DAG: %[[base:.*]] = fir.box_addr %[[box]]
   ! CHECK: %[[cast:.*]] = fir.convert %[[base]] : (!fir.heap<!fir.array<?x!fir.char<1,?>>>) -> !fir.ref<!fir.array<?x!fir.char<1,?>>>
-  ! CHECK: %[[c7:.*]] = fir.convert %c7{{.*}} : (i64) -> index 
-  ! CHECK: %[[sub:.*]] = arith.subi %[[c7]], %[[dims]]#0 : index 
-  ! CHECK: %[[mul:.*]] = arith.muli %[[len]], %[[sub]] : index 
+  ! CHECK: %[[c7:.*]] = fir.convert %c7{{.*}} : (i64) -> index
+  ! CHECK: %[[sub:.*]] = arith.subi %[[c7]], %[[dims]]#0 : index
+  ! CHECK: %[[mul:.*]] = arith.muli %[[len]], %[[sub]] : index
   ! CHECK: %[[offset:.*]] = arith.addi %[[mul]], %c0{{.*}} : index
   ! CHECK: %[[cnvt:.*]] = fir.convert %[[cast]]
   ! CHECK: %[[addr:.*]] = fir.coordinate_of %[[cnvt]], %[[offset]]
@@ -260,9 +260,9 @@ subroutine ref_scalar_def_char_a(a0_0, a1_0, a0_1, a1_1)
   ! CHECK-DAG: %[[len:.*]] = fir.box_elesize %[[box]]
   ! CHECK-DAG: %[[base:.*]] = fir.box_addr %[[box]]
   ! CHECK: %[[cast:.*]] = fir.convert %[[base]] : (!fir.heap<!fir.array<?x!fir.char<1,?>>>) -> !fir.ref<!fir.array<?x!fir.char<1,?>>>
-  ! CHECK: %[[c7:.*]] = fir.convert %c7{{.*}} : (i64) -> index 
-  ! CHECK: %[[sub:.*]] = arith.subi %[[c7]], %[[dims]]#0 : index 
-  ! CHECK: %[[mul:.*]] = arith.muli %[[len]], %[[sub]] : index 
+  ! CHECK: %[[c7:.*]] = fir.convert %c7{{.*}} : (i64) -> index
+  ! CHECK: %[[sub:.*]] = arith.subi %[[c7]], %[[dims]]#0 : index
+  ! CHECK: %[[mul:.*]] = arith.muli %[[len]], %[[sub]] : index
   ! CHECK: %[[offset:.*]] = arith.addi %[[mul]], %c0{{.*}} : index
   ! CHECK: %[[cnvt:.*]] = fir.convert %[[cast]]
   ! CHECK: %[[addr:.*]] = fir.coordinate_of %[[cnvt]], %[[offset]]
diff --git a/flang/test/Lower/derived-type-descriptor.f90 b/flang/test/Lower/derived-type-descriptor.f90
index 22f7bf188440b..46e4e2b02d51f 100644
--- a/flang/test/Lower/derived-type-descriptor.f90
+++ b/flang/test/Lower/derived-type-descriptor.f90
@@ -39,7 +39,7 @@ subroutine foo()
 ! CHECK: }
 
 subroutine char_comp_init()
-  implicit none  
+  implicit none
   type t
      character(8) :: name='Empty'
   end type t
diff --git a/flang/test/Lower/derived-types.f90 b/flang/test/Lower/derived-types.f90
index 7e36ec0cfe93f..142e70a1c4fb3 100644
--- a/flang/test/Lower/derived-types.f90
+++ b/flang/test/Lower/derived-types.f90
@@ -19,7 +19,7 @@ module d
 contains
 
 ! -----------------------------------------------------------------------------
-!            Test simple derived type symbol lowering 
+!            Test simple derived type symbol lowering
 ! -----------------------------------------------------------------------------
 
 ! CHECK-LABEL: func @_QMdPderived_dummy(
@@ -50,7 +50,7 @@ subroutine saved_derived()
 
 
 ! -----------------------------------------------------------------------------
-!            Test simple derived type references 
+!            Test simple derived type references
 ! -----------------------------------------------------------------------------
 
 ! CHECK-LABEL: func @_QMdPscalar_numeric_ref(
@@ -157,7 +157,7 @@ subroutine call_bar_return_derived()
 end module
 
 ! -----------------------------------------------------------------------------
-!            Test derived type with pointer/allocatable components 
+!            Test derived type with pointer/allocatable components
 ! -----------------------------------------------------------------------------
 
 module d2
@@ -174,7 +174,7 @@ subroutine test_recursive_type(some_recursive)
 end module
 
 ! -----------------------------------------------------------------------------
-!            Test global derived type symbol lowering 
+!            Test global derived type symbol lowering
 ! -----------------------------------------------------------------------------
 
 module data_mod
diff --git a/flang/test/Lower/dispatch.f90 b/flang/test/Lower/dispatch.f90
index 41ebad7a1f4e3..863a26c685f7f 100644
--- a/flang/test/Lower/dispatch.f90
+++ b/flang/test/Lower/dispatch.f90
@@ -155,7 +155,7 @@ subroutine check_dispatch(p)
 ! CHECK:       fir.dispatch "tbp_nopass"(%[[P_DECL]]#1 : !fir.class<!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>){{$}}
 ! CHECK:       fir.dispatch "tbp_pass"(%[[P_DECL]]#0 : !fir.class<!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>) (%[[P_DECL]]#0 : !fir.class<!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>) {pass_arg_pos = 0 : i32}
 ! CHECK:       fir.dispatch "tbp_pass_arg0"(%[[P_DECL]]#0 : !fir.class<!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>) (%[[P_DECL]]#0 : !fir.class<!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>) {pass_arg_pos = 0 : i32}
-! CHECK:       fir.dispatch "tbp_pass_arg1"(%[[P_DECL]]#0 : !fir.class<!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>)  (%{{.*}}, %[[P_DECL]]#0 : !fir.ref<i32>, !fir.class<!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>) {pass_arg_pos = 1 : i32} 
+! CHECK:       fir.dispatch "tbp_pass_arg1"(%[[P_DECL]]#0 : !fir.class<!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>)  (%{{.*}}, %[[P_DECL]]#0 : !fir.ref<i32>, !fir.class<!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>) {pass_arg_pos = 1 : i32}
 
 ! CHECK:       fir.dispatch "proc1"(%[[P_DECL]]#1 : !fir.class<!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>){{$}}
 ! CHECK:       fir.dispatch "proc2"(%[[P_DECL]]#0 : !fir.class<!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>) (%[[P_DECL]]#0 : !fir.class<!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>) {pass_arg_pos = 0 : i32}
@@ -174,7 +174,7 @@ subroutine check_dispatch_deferred(a, x)
   end subroutine
 
 ! CHECK-LABEL: func.func @_QMcall_dispatchPcheck_dispatch_deferred(
-! CHECK-SAME: %[[ARG0:.*]]: !fir.class<!fir.type<_QMcall_dispatchTa1{a:f32,b:f32}>> {fir.bindc_name = "a"}, 
+! CHECK-SAME: %[[ARG0:.*]]: !fir.class<!fir.type<_QMcall_dispatchTa1{a:f32,b:f32}>> {fir.bindc_name = "a"},
 ! CHECK-SAME: %[[ARG1:.*]]: !fir.box<!fir.array<?xf32>> {fir.bindc_name = "x"}) {
 ! CHECK: %[[ARG0_DECL:.*]]:2 = hlfir.declare %[[ARG0]] dummy_scope %{{[0-9]+}} arg {{[0-9]+}} {uniq_name = "_QMcall_dispatchFcheck_dispatch_deferredEa"} : (!fir.class<!fir.type<_QMcall_dispatchTa1{a:f32,b:f32}>>, !fir.dscope) -> (!fir.class<!fir.type<_QMcall_dispatchTa1{a:f32,b:f32}>>, !fir.class<!fir.type<_QMcall_dispatchTa1{a:f32,b:f32}>>)
 ! CHECK: %[[ARG1_DECL:.*]]:2 = hlfir.declare %[[ARG1]] dummy_scope %{{[0-9]+}} arg {{[0-9]+}} {uniq_name = "_QMcall_dispatchFcheck_dispatch_deferredEx"} : (!fir.box<!fir.array<?xf32>>, !fir.dscope) -> (!fir.box<!fir.array<?xf32>>, !fir.box<!fir.array<?xf32>>)
@@ -218,7 +218,7 @@ subroutine check_dispatch_static_array(p, t)
     end subroutine
 
 ! CHECK-LABEL: func.func @_QMcall_dispatchPcheck_dispatch_static_array(
-! CHECK-SAME: %[[ARG0:.*]]: !fir.class<!fir.array<10x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>> {fir.bindc_name = "p"}, 
+! CHECK-SAME: %[[ARG0:.*]]: !fir.class<!fir.array<10x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>> {fir.bindc_name = "p"},
 ! CHECK-SAME: %[[ARG1:.*]]: !fir.ref<!fir.array<10x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>> {fir.bindc_name = "t"}) {
 ! CHECK: %[[ARG0_DECL:.*]]:2 = hlfir.declare %[[ARG0]] dummy_scope %{{[0-9]+}} arg {{[0-9]+}} {uniq_name = "_QMcall_dispatchFcheck_dispatch_static_arrayEp"} : (!fir.class<!fir.array<10x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>, !fir.dscope) -> (!fir.class<!fir.array<10x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>, !fir.class<!fir.array<10x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>)
 ! CHECK: %[[ARG1_DECL:.*]]:2 = hlfir.declare %[[ARG1]](%{{.*}}) dummy_scope %{{[0-9]+}} arg {{[0-9]+}} {uniq_name = "_QMcall_dispatchFcheck_dispatch_static_arrayEt"} : (!fir.ref<!fir.array<10x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>, !fir.shape<1>, !fir.dscope) -> (!fir.ref<!fir.array<10x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>, !fir.ref<!fir.array<10x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>)
@@ -246,7 +246,7 @@ subroutine check_dispatch_dynamic_array(p, t)
     end subroutine
 
 ! CHECK-LABEL: func.func @_QMcall_dispatchPcheck_dispatch_dynamic_array(
-! CHECK-SAME: %[[ARG0:.*]]: !fir.class<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>> {fir.bindc_name = "p"}, 
+! CHECK-SAME: %[[ARG0:.*]]: !fir.class<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>> {fir.bindc_name = "p"},
 ! CHECK-SAME: %[[ARG1:.*]]: !fir.box<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>> {fir.bindc_name = "t"}) {
 ! CHECK: %[[ARG0_DECL:.*]]:2 = hlfir.declare %[[ARG0]] dummy_scope %{{[0-9]+}} arg {{[0-9]+}} {uniq_name = "_QMcall_dispatchFcheck_dispatch_dynamic_arrayEp"} : (!fir.class<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>, !fir.dscope) -> (!fir.class<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>, !fir.class<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>)
 ! CHECK: %[[ARG1_DECL:.*]]:2 = hlfir.declare %[[ARG1]] dummy_scope %{{[0-9]+}} arg {{[0-9]+}} {uniq_name = "_QMcall_dispatchFcheck_dispatch_dynamic_arrayEt"} : (!fir.box<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>, !fir.dscope) -> (!fir.box<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>, !fir.box<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>)
@@ -274,7 +274,7 @@ subroutine check_dispatch_allocatable_array(p, t)
     end subroutine
 
 ! CHECK-LABEL: func.func @_QMcall_dispatchPcheck_dispatch_allocatable_array(
-! CHECK-SAME: %[[ARG0:.*]]: !fir.ref<!fir.class<!fir.heap<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>>> {fir.bindc_name = "p"}, 
+! CHECK-SAME: %[[ARG0:.*]]: !fir.ref<!fir.class<!fir.heap<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>>> {fir.bindc_name = "p"},
 ! CHECK-SAME: %[[ARG1:.*]]: !fir.ref<!fir.box<!fir.heap<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>>> {fir.bindc_name = "t"}) {
 ! CHECK: %[[ARG0_DECL:.*]]:2 = hlfir.declare %[[ARG0]] dummy_scope %{{[0-9]+}} arg {{[0-9]+}} {fortran_attrs = #fir.var_attrs<allocatable>, uniq_name = "_QMcall_dispatchFcheck_dispatch_allocatable_arrayEp"} : (!fir.ref<!fir.class<!fir.heap<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>>>, !fir.dscope) -> (!fir.ref<!fir.class<!fir.heap<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>>>, !fir.ref<!fir.class<!fir.heap<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>>>)
 ! CHECK: %[[ARG1_DECL:.*]]:2 = hlfir.declare %[[ARG1]] dummy_scope %{{[0-9]+}} arg {{[0-9]+}} {fortran_attrs = #fir.var_attrs<allocatable>, uniq_name = "_QMcall_dispatchFcheck_dispatch_allocatable_arrayEt"} : (!fir.ref<!fir.box<!fir.heap<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>>>, !fir.dscope) -> (!fir.ref<!fir.box<!fir.heap<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>>>, !fir.ref<!fir.box<!fir.heap<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>>>)
@@ -304,7 +304,7 @@ subroutine check_dispatch_pointer_array(p, t)
     end subroutine
 
 ! CHECK-LABEL: func.func @_QMcall_dispatchPcheck_dispatch_pointer_array(
-! CHECK-SAME: %[[ARG0:.*]]: !fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>>> {fir.bindc_name = "p"}, 
+! CHECK-SAME: %[[ARG0:.*]]: !fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>>> {fir.bindc_name = "p"},
 ! CHECK-SAME: %[[ARG1:.*]]: !fir.ref<!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>>> {fir.bindc_name = "t"}) {
 ! CHECK: %[[ARG0_DECL:.*]]:2 = hlfir.declare %[[ARG0]] dummy_scope %{{[0-9]+}} arg {{[0-9]+}} {fortran_attrs = #fir.var_attrs<pointer>, uniq_name = "_QMcall_dispatchFcheck_dispatch_pointer_arrayEp"} : (!fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>>>, !fir.dscope) -> (!fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>>>, !fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>>>)
 ! CHECK: %[[ARG1_DECL:.*]]:2 = hlfir.declare %[[ARG1]] dummy_scope %{{[0-9]+}} arg {{[0-9]+}} {fortran_attrs = #fir.var_attrs<pointer>, uniq_name = "_QMcall_dispatchFcheck_dispatch_pointer_arrayEt"} : (!fir.ref<!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>>>, !fir.dscope) -> (!fir.ref<!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>>>, !fir.ref<!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>>>)
@@ -332,7 +332,7 @@ subroutine check_dispatch_dynamic_array_copy(p, o)
     end subroutine
 
 ! CHECK-LABEL: func.func @_QMcall_dispatchPcheck_dispatch_dynamic_array_copy(
-! CHECK-SAME: %[[ARG0:.*]]: !fir.class<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>> {fir.bindc_name = "p"}, 
+! CHECK-SAME: %[[ARG0:.*]]: !fir.class<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>> {fir.bindc_name = "p"},
 ! CHECK-SAME: %[[ARG1:.*]]: !fir.class<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>> {fir.bindc_name = "o"}) {
 ! CHECK: %[[ARG1_DECL:.*]]:2 = hlfir.declare %[[ARG1]] dummy_scope %{{[0-9]+}} arg {{[0-9]+}} {uniq_name = "_QMcall_dispatchFcheck_dispatch_dynamic_array_copyEo"} : (!fir.class<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>, !fir.dscope) -> (!fir.class<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>, !fir.class<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>)
 ! CHECK: %[[ARG0_DECL:.*]]:2 = hlfir.declare %[[ARG0]] dummy_scope %{{[0-9]+}} arg {{[0-9]+}} {uniq_name = "_QMcall_dispatchFcheck_dispatch_dynamic_array_copyEp"} : (!fir.class<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>, !fir.dscope) -> (!fir.class<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>, !fir.class<!fir.array<?x!fir.type<_QMcall_dispatchTp1{a:i32,b:i32}>>>)
diff --git a/flang/test/Lower/do_concurrent_delayed_locality.f90 b/flang/test/Lower/do_concurrent_delayed_locality.f90
index 6cae0eb46db13..9d1efcd263a5a 100644
--- a/flang/test/Lower/do_concurrent_delayed_locality.f90
+++ b/flang/test/Lower/do_concurrent_delayed_locality.f90
@@ -7,7 +7,7 @@ subroutine do_concurrent_with_locality_specs
   do concurrent (i=1:10) local(local_var) local_init(local_init_var)
     if (i < 5) then
       local_var = 42
-    else 
+    else
       local_init_var = 84
     end if
   end do
diff --git a/flang/test/Lower/do_concurrent_reduce.f90 b/flang/test/Lower/do_concurrent_reduce.f90
index 8591a21e2b9e0..6d6d56c956b10 100644
--- a/flang/test/Lower/do_concurrent_reduce.f90
+++ b/flang/test/Lower/do_concurrent_reduce.f90
@@ -26,7 +26,7 @@ subroutine do_concurrent_reduce
 ! CHECK:           fir.do_concurrent {
 ! CHECK:             %[[VAL_0:.*]] = fir.alloca i32 {bindc_name = "i"}
 ! CHECK:             %[[VAL_1:.*]]:2 = hlfir.declare %[[VAL_0]] {uniq_name = "_QFdo_concurrent_reduceEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
-! CHECK:             fir.do_concurrent.loop (%{{.*}}) = (%{{.*}}) to (%{{.*}}) step (%{{[^[:space:]]+}}) 
+! CHECK:             fir.do_concurrent.loop (%{{.*}}) = (%{{.*}}) to (%{{.*}}) step (%{{[^[:space:]]+}})
 ! CHECK-SAME:          reduce(@add_reduction_i32 #fir.reduce_attr<add> %[[S_DECL]]#0 -> %[[S_ARG:.*]] : !fir.ref<i32>) {
 
 ! CHECK:               %[[S_ARG_DECL:.*]]:2 = hlfir.declare %[[S_ARG]] {uniq_name = "_QFdo_concurrent_reduceEs"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
diff --git a/flang/test/Lower/do_loop.f90 b/flang/test/Lower/do_loop.f90
index 065324ac200da..d3535280d6dd6 100644
--- a/flang/test/Lower/do_loop.f90
+++ b/flang/test/Lower/do_loop.f90
@@ -3,7 +3,7 @@
 ! RUN: %flang_fc1 -mllvm --use-desc-for-alloc=false -emit-fir -flang-deprecated-no-hlfir -fwrapv -o - %s | FileCheck %s --check-prefix=NO-NSW
 
 ! Simple tests for structured ordered loops with loop-control.
-! Tests the structure of the loop, storage to index variable and return and 
+! Tests the structure of the loop, storage to index variable and return and
 ! storage of the final value of the index variable.
 
 ! NO-NSW-NOT: overflow<nsw>
diff --git a/flang/test/Lower/dummy-argument-contiguous.f90 b/flang/test/Lower/dummy-argument-contiguous.f90
index 118370cef9aa4..19bc3818ea0f5 100644
--- a/flang/test/Lower/dummy-argument-contiguous.f90
+++ b/flang/test/Lower/dummy-argument-contiguous.f90
@@ -2,7 +2,7 @@
 ! RUN: bbc -emit-fir -hlfir=false -gen-array-coor %s -o - | FileCheck %s --check-prefix=ArrayCoorCHECK
 
 ! Test that non-contiguous assumed-shape memory layout is handled in lowering.
-! In practice, test that input fir.box is propagated to fir operations 
+! In practice, test that input fir.box is propagated to fir operations
 
 ! Also test that when the contiguous keyword is present, lowering adds the
 ! attribute to the fir argument and that is takes the contiguity into account
diff --git a/flang/test/Lower/dummy-procedure-character.f90 b/flang/test/Lower/dummy-procedure-character.f90
index a9a8a5a4172cf..7a6bb249d30d0 100644
--- a/flang/test/Lower/dummy-procedure-character.f90
+++ b/flang/test/Lower/dummy-procedure-character.f90
@@ -234,7 +234,7 @@ subroutine intern()
 ! CHECK-SAME:  %[[VAL_0:.*]]: tuple<!fir.boxproc<() -> ()>, i64> {fir.char_proc})
 subroutine host2(f)
   ! Test that dummy length is overridden by local length even when used
-  ! in the internal procedure. 
+  ! in the internal procedure.
   character*(42) :: f
   external :: f
   ! CHECK:  %[[VAL_3:.*]] = fir.coordinate_of %[[VAL_1:.*]], %{{.*}} : (!fir.ref<tuple<tuple<!fir.boxproc<() -> ()>, i64>>>, i32) -> !fir.ref<tuple<!fir.boxproc<() -> ()>, i64>>
diff --git a/flang/test/Lower/dummy-procedure.f90 b/flang/test/Lower/dummy-procedure.f90
index a84c351b1166b..a02aa21d2cc2e 100644
--- a/flang/test/Lower/dummy-procedure.f90
+++ b/flang/test/Lower/dummy-procedure.f90
@@ -141,7 +141,7 @@ subroutine test_iabs()
   call foo_iabs(iabs)
 end subroutine
 
-! TODO: exhaustive test of unrestricted intrinsic table 16.2 
+! TODO: exhaustive test of unrestricted intrinsic table 16.2
 
 ! TODO: improve dummy procedure types when interface is given.
 ! CHECK: func @_QPtodo3(
diff --git a/flang/test/Lower/equivalence-1.f90 b/flang/test/Lower/equivalence-1.f90
index 133accd38c2f7..deb3a5b5614f4 100644
--- a/flang/test/Lower/equivalence-1.f90
+++ b/flang/test/Lower/equivalence-1.f90
@@ -53,7 +53,7 @@ SUBROUTINE s3
   ! CHECK: %{{.*}} = fir.load %[[v2loc]] : !fir.ref<f32>
   PRINT *, r(9)
 END SUBROUTINE s3
-  
+
 ! test that equivalence in main program containing arrays are placed in global memory.
 ! CHECK: fir.global internal @_QFEa : !fir.array<400000000xi8>
   integer :: a, b(100000000)
diff --git a/flang/test/Lower/equivalence-2.f90 b/flang/test/Lower/equivalence-2.f90
index 2cea88ee7440c..1c4506054c76a 100644
--- a/flang/test/Lower/equivalence-2.f90
+++ b/flang/test/Lower/equivalence-2.f90
@@ -61,7 +61,7 @@ subroutine test_eq_sets
 subroutine eq_and_entry_foo
   SAVE x, i
   DIMENSION :: x(2)
-  EQUIVALENCE (x(2), i) 
+  EQUIVALENCE (x(2), i)
   call foo1(x, i)
   ! CHECK: %[[xi:.*]] = fir.address_of(@_QFeq_and_entry_fooEi) : !fir.ref<!fir.array<8xi8>>
 
diff --git a/flang/test/Lower/explicit-interface-results.f90 b/flang/test/Lower/explicit-interface-results.f90
index 612d57be36448..8d51786da14ca 100644
--- a/flang/test/Lower/explicit-interface-results.f90
+++ b/flang/test/Lower/explicit-interface-results.f90
@@ -313,7 +313,7 @@ module m_with_equiv
   function result_depends_on_equiv_sym()
     character(l) :: result_depends_on_equiv_sym
     call set_result_with_some_value(result_depends_on_equiv_sym)
-  end function  
+  end function
 end module
 
 ! CHECK-LABEL: func @_QPtest_result_depends_on_equiv_sym
@@ -387,7 +387,7 @@ function test_recursion(n) result(res)
   if (n.eq.1) then
     res = char(some_local(1))
   ! CHECK: else
-  else 
+  else
     ! CHECK-NOT: fir.alloca !fir.array<?xi32>
 
     ! verify that the actual argument for symbol n ("n-1") is used to allocate
diff --git a/flang/test/Lower/host-associated.f90 b/flang/test/Lower/host-associated.f90
index d5392411e0c56..d1f3b3566fe8e 100644
--- a/flang/test/Lower/host-associated.f90
+++ b/flang/test/Lower/host-associated.f90
@@ -135,7 +135,7 @@ subroutine test3(p,q,i)
   if (p(2) .ne. -42.0) then
      print *, "failed"
   end if
-  
+
 contains
   ! CHECK-LABEL: func private @_QFtest3Ptest3_inner(
   ! CHECK-SAME: %[[tup:.*]]: !fir.ref<tuple<!fir.box<!fir.array<?xf32>>, !fir.box<!fir.array<?xf32>>>> {fir.host_assoc}) attributes {fir.host_symbol = {{.*}}, llvm.linkage = #llvm.linkage<internal>} {
@@ -182,7 +182,7 @@ subroutine test3a(p)
   if (p(1) .ne. -42.0) then
      print *, "failed"
   end if
-  
+
 contains
   ! CHECK: func private @_QFtest3aPtest3a_inner(
   ! CHECK-SAME: %[[tup:.*]]: !fir.ref<tuple<!fir.box<!fir.array<10xf32>>, !fir.box<!fir.array<10xf32>>>> {fir.host_assoc}) attributes {fir.host_symbol = {{.*}}, llvm.linkage = #llvm.linkage<internal>} {
@@ -226,7 +226,7 @@ subroutine test4
   if (p .ne. -42.0) then
      print *, "failed"
   end if
-  
+
 contains
   ! CHECK-LABEL: func private @_QFtest4Ptest4_inner(
   ! CHECK-SAME:%[[tup:.*]]: !fir.ref<tuple<!fir.ref<!fir.box<!fir.ptr<f32>>>, !fir.ref<!fir.box<!fir.heap<f32>>>>> {fir.host_assoc}) attributes {fir.host_symbol = {{.*}}, llvm.linkage = #llvm.linkage<internal>} {
@@ -268,7 +268,7 @@ subroutine test5
   if (p(1) .ne. -42.0) then
      print *, "failed"
   end if
-  
+
 contains
   ! CHECK-LABEL: func private @_QFtest5Ptest5_inner(
   ! CHECK-SAME:%[[tup:.*]]: !fir.ref<tuple<!fir.ref<!fir.box<!fir.ptr<!fir.array<?xf32>>>>, !fir.ref<!fir.box<!fir.heap<!fir.array<?xf32>>>>>> {fir.host_assoc}) attributes {fir.host_symbol = {{.*}}, llvm.linkage = #llvm.linkage<internal>} {
@@ -420,7 +420,7 @@ subroutine test10(i)
 subroutine bar()
   ! CHECK: %[[tupAddr:.*]] = fir.coordinate_of %[[tup]], %c0{{.*}} : (!fir.ref<tuple<!fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>>>>, i32) -> !fir.llvm_ptr<!fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>>>
   ! CHECK: fir.load %[[tupAddr]] : !fir.llvm_ptr<!fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>>>
-  read (88, NML = a_namelist) 
+  read (88, NML = a_namelist)
 end subroutine
 end subroutine
 
@@ -642,7 +642,7 @@ end subroutine test_proc_dummy_char
 function get_message(a)
   character(40) :: get_message
   character(*) :: a
-  get_message = "message is: " // a() 
+  get_message = "message is: " // a()
 end function get_message
 
 ! CHECK-LABEL: func @_QPtest_11a() {



More information about the flang-commits mailing list