[flang-commits] [flang] [flang][NFC] Strip trailing whitespace from tests (8 of N) (PR #168723)
via flang-commits
flang-commits at lists.llvm.org
Wed Nov 19 07:34:35 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-fir-hlfir
Author: Tarun Prabhu (tarunprabhu)
<details>
<summary>Changes</summary>
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
---
Patch is 35.34 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/168723.diff
26 Files Affected:
- (modified) flang/test/Lower/identical-block-merge-disable.f90 (+2-2)
- (modified) flang/test/Lower/implicit-interface.f90 (+1-1)
- (modified) flang/test/Lower/inline_directive.f90 (+1-1)
- (modified) flang/test/Lower/io-statement-1.f90 (+1-1)
- (modified) flang/test/Lower/io-write.f90 (+1-1)
- (modified) flang/test/Lower/location.f90 (+1-1)
- (modified) flang/test/Lower/module_definition.f90 (+1-1)
- (modified) flang/test/Lower/module_use.f90 (+1-1)
- (modified) flang/test/Lower/module_use_in_same_file.f90 (+2-2)
- (modified) flang/test/Lower/namelist-common-block.f90 (+1-1)
- (modified) flang/test/Lower/nested-where.f90 (+1-1)
- (modified) flang/test/Lower/nullify-polymorphic.f90 (+4-4)
- (modified) flang/test/Lower/pointer-association-polymorphic.f90 (+5-5)
- (modified) flang/test/Lower/pointer-disassociate.f90 (+2-2)
- (modified) flang/test/Lower/polymorphic-temp.f90 (+2-2)
- (modified) flang/test/Lower/polymorphic-types.f90 (+1-1)
- (modified) flang/test/Lower/polymorphic.f90 (+6-6)
- (modified) flang/test/Lower/pre-fir-tree02.f90 (+1-1)
- (modified) flang/test/Lower/procedure-declarations.f90 (+10-10)
- (modified) flang/test/Lower/read-write-buffer.f90 (+2-2)
- (modified) flang/test/Lower/select-case-statement.f90 (+2-2)
- (modified) flang/test/Lower/select-type.f90 (+8-8)
- (modified) flang/test/Lower/statement-function.f90 (+1-1)
- (modified) flang/test/Lower/variable.f90 (+1-1)
- (modified) flang/test/Lower/volatile-allocatable.f90 (+13-13)
- (modified) flang/test/Lower/volatile-openmp1.f90 (+1-1)
``````````diff
diff --git a/flang/test/Lower/identical-block-merge-disable.f90 b/flang/test/Lower/identical-block-merge-disable.f90
index cc3120a3b6f67..ff3ff67b7b213 100644
--- a/flang/test/Lower/identical-block-merge-disable.f90
+++ b/flang/test/Lower/identical-block-merge-disable.f90
@@ -6,7 +6,7 @@ MODULE DMUMPS_SOL_LR
IMPLICIT NONE
TYPE BLR_STRUC_T
- INTEGER, DIMENSION(:), POINTER :: PANELS_L
+ INTEGER, DIMENSION(:), POINTER :: PANELS_L
INTEGER, DIMENSION(:), POINTER :: PANELS_U
INTEGER, DIMENSION(:), POINTER :: BEGS_BLR_STATIC
END TYPE BLR_STRUC_T
@@ -32,7 +32,7 @@ SUBROUTINE DMUMPS_SOL_FWD_LR_SU( IWHDLR, MTYPE )
ENDIF
ENDIF
-END SUBROUTINE DMUMPS_SOL_FWD_LR_SU
+END SUBROUTINE DMUMPS_SOL_FWD_LR_SU
END MODULE DMUMPS_SOL_LR
diff --git a/flang/test/Lower/implicit-interface.f90 b/flang/test/Lower/implicit-interface.f90
index f924a3f5d3e9e..0be50203b2c01 100644
--- a/flang/test/Lower/implicit-interface.f90
+++ b/flang/test/Lower/implicit-interface.f90
@@ -22,7 +22,7 @@ subroutine test_passing_char_array
! CHECK-DAG: %[[c3:.*]] = arith.constant 3 : index
! CHECK-DAG: %[[xbuff:.*]] = fir.convert %[[xarray]] : (!fir.ref<!fir.array<4x!fir.char<1,3>>>) -> !fir.ref<!fir.char<1,?>>
! CHECK: %[[boxchar:.*]] = fir.emboxchar %[[xbuff]], %[[c3]] : (!fir.ref<!fir.char<1,?>>, index) -> !fir.boxchar<1>
- ! CHECK: fir.call @_QPsub_taking_a_char_array(%[[boxchar]]) {{.*}}: (!fir.boxchar<1>) -> ()
+ ! CHECK: fir.call @_QPsub_taking_a_char_array(%[[boxchar]]) {{.*}}: (!fir.boxchar<1>) -> ()
end subroutine
! TODO more implicit interface cases with/without explicit interface
diff --git a/flang/test/Lower/inline_directive.f90 b/flang/test/Lower/inline_directive.f90
index 347df85f05dda..5748690d5914d 100644
--- a/flang/test/Lower/inline_directive.f90
+++ b/flang/test/Lower/inline_directive.f90
@@ -11,7 +11,7 @@ subroutine test_inline()
y = g(x)
!CHECK: %[[VAL_4:.*]] = fir.call @_QFtest_inlinePg(%[[VAL_1]]) fastmath<contract> {inline_attr = #fir.inline_attrs<always_inline>} : (!fir.ref<i32>) -> i32
!CHECK: fir.store %[[VAL_4]] to %[[VAL_3]] : !fir.ref<i32>
-
+
!dir$ forceinline
call f(x, y)
!CHECK: fir.call @_QFtest_inlinePf(%[[VAL_1]], %[[VAL_3]]) fastmath<contract> {inline_attr = #fir.inline_attrs<always_inline>} : (!fir.ref<i32>, !fir.ref<i32>) -> ()
diff --git a/flang/test/Lower/io-statement-1.f90 b/flang/test/Lower/io-statement-1.f90
index ac7874594d2fc..ecf2e2d287774 100644
--- a/flang/test/Lower/io-statement-1.f90
+++ b/flang/test/Lower/io-statement-1.f90
@@ -19,7 +19,7 @@
! CHECK: call {{.*}}BeginFlush
! CHECK: call {{.*}}EndIoStatement
flush(8)
-
+
! CHECK: call {{.*}}BeginRewind
! CHECK: call {{.*}}EndIoStatement
rewind(8)
diff --git a/flang/test/Lower/io-write.f90 b/flang/test/Lower/io-write.f90
index 234fcdabeaac8..3159dcf771bb7 100644
--- a/flang/test/Lower/io-write.f90
+++ b/flang/test/Lower/io-write.f90
@@ -1,6 +1,6 @@
! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s
-! Test that IO item calls stackrestore in the right place
+! Test that IO item calls stackrestore in the right place
! CHECK-LABEL: func.func @_QQmain() {
character(3) string
diff --git a/flang/test/Lower/location.f90 b/flang/test/Lower/location.f90
index 95bf2260fc107..cdde1cc4cb40a 100644
--- a/flang/test/Lower/location.f90
+++ b/flang/test/Lower/location.f90
@@ -3,7 +3,7 @@
program test
include 'location0.inc'
-end
+end
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "TEST"} {
! CHECK: fir.call @_FortranAioOutputAscii(%{{.*}}, %{{.*}}, %{{.*}}) fastmath<contract> : (!fir.ref<i8>, !fir.ref<i8>, i64) -> i1 loc(fused<#fir<loc_kind_array[ base, inclusion, inclusion]>>["{{.*}}location1.inc":1:10, "{{.*}}location0.inc":1:1, "{{.*}}location.f90":4:1])
diff --git a/flang/test/Lower/module_definition.f90 b/flang/test/Lower/module_definition.f90
index 0a05364ca473c..a96bc919c6730 100644
--- a/flang/test/Lower/module_definition.f90
+++ b/flang/test/Lower/module_definition.f90
@@ -36,7 +36,7 @@ module m1
! file.
module modEq1
! Equivalence, no initialization
- real :: x1(10), x2(10), x3(10)
+ real :: x1(10), x2(10), x3(10)
! Equivalence with initialization
real :: y1 = 42.
real :: y2(10)
diff --git a/flang/test/Lower/module_use.f90 b/flang/test/Lower/module_use.f90
index 92acbfbee0b9e..e7f56f57b2c7e 100644
--- a/flang/test/Lower/module_use.f90
+++ b/flang/test/Lower/module_use.f90
@@ -36,7 +36,7 @@ real function modCommon1Use()
! CHECK-DAG: fir.address_of(@named2_) : !fir.ref<!fir.array<4xi8>>
! CHECK-DAG: fir.address_of(@__BLNK__) : !fir.ref<!fir.array<4xi8>>
! CHECK-DAG: fir.address_of(@named1_) : !fir.ref<!fir.array<4xi8>>
- modCommon1Use = x_blank + x_named1 + i_named2
+ modCommon1Use = x_blank + x_named1 + i_named2
end function
diff --git a/flang/test/Lower/module_use_in_same_file.f90 b/flang/test/Lower/module_use_in_same_file.f90
index 9e51bee14fd7a..7ef64f0bc160e 100644
--- a/flang/test/Lower/module_use_in_same_file.f90
+++ b/flang/test/Lower/module_use_in_same_file.f90
@@ -35,7 +35,7 @@ real function m2use_rename()
! Module modEq2 defines data that is equivalenced
module modEq2
! Equivalence, no initialization
- real :: x1(10), x2(10), x3(10)
+ real :: x1(10), x2(10), x3(10)
! Equivalence with initialization
real :: y1 = 42.
real :: y2(10)
@@ -109,7 +109,7 @@ real function test_no_equiv_conflicts()
use modEq2
! Same equivalences as in modEq2. Test that lowering does not mixes
! up the equivalence based on the similar offset inside the scope.
- real :: x1l(10), x2l(10), x3l(10)
+ real :: x1l(10), x2l(10), x3l(10)
real :: y1l = 42.
real :: y2l(10)
save :: x1l, x2l, x3l, y1l, y2l
diff --git a/flang/test/Lower/namelist-common-block.f90 b/flang/test/Lower/namelist-common-block.f90
index d16f886dadb5b..54d4b9e552510 100644
--- a/flang/test/Lower/namelist-common-block.f90
+++ b/flang/test/Lower/namelist-common-block.f90
@@ -8,7 +8,7 @@ program nml_common
real, pointer :: p(:)
namelist /t/i,p
common /c/i,p
-
+
allocate(p(2))
call print_t()
contains
diff --git a/flang/test/Lower/nested-where.f90 b/flang/test/Lower/nested-where.f90
index 28aced2325813..1e379667b7b03 100644
--- a/flang/test/Lower/nested-where.f90
+++ b/flang/test/Lower/nested-where.f90
@@ -313,7 +313,7 @@ program nested_where
! CHECK: fir.call @_FortranARaggedArrayDeallocate(%[[VAL_278]]) {{.*}}: (!fir.llvm_ptr<i8>) -> ()
! CHECK: %[[VAL_280:.*]] = fir.convert %[[VAL_4]] : (!fir.ref<tuple<i64, !fir.heap<!fir.array<?xi8>>, !fir.heap<!fir.array<?xi64>>>>) -> !fir.llvm_ptr<i8>
! CHECK: fir.call @_FortranARaggedArrayDeallocate(%[[VAL_280]]) {{.*}}: (!fir.llvm_ptr<i8>) -> ()
-
+
integer :: a(3) = 0
logical :: mask1(3) = (/ .true.,.false.,.true. /)
logical :: mask2(3) = (/ .true.,.true.,.false. /)
diff --git a/flang/test/Lower/nullify-polymorphic.f90 b/flang/test/Lower/nullify-polymorphic.f90
index 58eaa11f29f64..9a6a2795d3057 100644
--- a/flang/test/Lower/nullify-polymorphic.f90
+++ b/flang/test/Lower/nullify-polymorphic.f90
@@ -13,7 +13,7 @@ module poly
contains
procedure, nopass :: proc1 => proc1_p2
end type
-
+
contains
subroutine proc1_p1()
@@ -23,7 +23,7 @@ subroutine proc1_p1()
subroutine proc1_p2()
print*, 'call proc1_p2'
end subroutine
-
+
subroutine test_nullify()
class(p1), pointer :: c
@@ -31,7 +31,7 @@ subroutine test_nullify()
call c%proc1()
nullify(c) ! c dynamic type must be reset to p1
-
+
call c%proc1()
end subroutine
end module
@@ -45,7 +45,7 @@ program test
! CHECK: %[[C_DESC:.*]] = fir.alloca !fir.class<!fir.ptr<!fir.type<_QMpolyTp1{a:i32,b:i32}>>> {bindc_name = "c", uniq_name = "_QMpolyFtest_nullifyEc"}
! CHECK: %[[C_DESC_DECL:.*]]:2 = hlfir.declare %[[C_DESC]] {fortran_attrs = #fir.var_attrs<pointer>, uniq_name = "_QMpolyFtest_nullifyEc"} : (!fir.ref<!fir.class<!fir.ptr<!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>) -> (!fir.ref<!fir.class<!fir.ptr<!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>, !fir.ref<!fir.class<!fir.ptr<!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>)
! CHECK: %{{.*}} = fir.call @_FortranAPointerAllocate(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) {{.*}}: (!fir.ref<!fir.box<none>>, i1, !fir.box<none>, !fir.ref<i8>, i32) -> i32
-! CHECK: %[[DECLARED_TYPE_DESC:.*]] = fir.type_desc !fir.type<_QMpolyTp1{a:i32,b:i32}>
+! CHECK: %[[DECLARED_TYPE_DESC:.*]] = fir.type_desc !fir.type<_QMpolyTp1{a:i32,b:i32}>
! CHECK: %[[C_DESC_CAST:.*]] = fir.convert %[[C_DESC_DECL]]#0 : (!fir.ref<!fir.class<!fir.ptr<!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>) -> !fir.ref<!fir.box<none>>
! CHECK: %[[TYPE_DESC_CAST:.*]] = fir.convert %[[DECLARED_TYPE_DESC]] : (!fir.tdesc<!fir.type<_QMpolyTp1{a:i32,b:i32}>>) -> !fir.ref<none>
! CHECK: %[[RANK:.*]] = arith.constant 0 : i32
diff --git a/flang/test/Lower/pointer-association-polymorphic.f90 b/flang/test/Lower/pointer-association-polymorphic.f90
index 7d166e1423cfa..a82eebb1c5958 100644
--- a/flang/test/Lower/pointer-association-polymorphic.f90
+++ b/flang/test/Lower/pointer-association-polymorphic.f90
@@ -143,9 +143,9 @@ subroutine test_pointer()
! CHECK: %[[C4_LOAD:.*]] = fir.load %[[C4_DESC]] : !fir.ref<!fir.class<!fir.heap<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>>
! CHECK: %[[C4_REBOX:.*]] = fir.rebox %[[C4_LOAD]](%{{.*}}) : (!fir.class<!fir.heap<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>, !fir.shift<1>) -> !fir.class<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>
-! CHECK: %[[PA_CONV:.*]] = fir.convert %[[PA_DESC]] : (!fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>>) -> !fir.ref<!fir.box<none>>
-! CHECK: %[[C4_REBOX_CONV:.*]] = fir.convert %[[C4_REBOX]] : (!fir.class<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>) -> !fir.box<none>
-! CHECK: fir.call @_FortranAPointerAssociate(%[[PA_CONV]], %[[C4_REBOX_CONV]]) {{.*}} : (!fir.ref<!fir.box<none>>, !fir.box<none>) -> ()
+! CHECK: %[[PA_CONV:.*]] = fir.convert %[[PA_DESC]] : (!fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>>) -> !fir.ref<!fir.box<none>>
+! CHECK: %[[C4_REBOX_CONV:.*]] = fir.convert %[[C4_REBOX]] : (!fir.class<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>) -> !fir.box<none>
+! CHECK: fir.call @_FortranAPointerAssociate(%[[PA_CONV]], %[[C4_REBOX_CONV]]) {{.*}} : (!fir.ref<!fir.box<none>>, !fir.box<none>) -> ()
! CHECK-LABEL: fir.do_loop
! CHECK: %[[PA_LOAD:.*]] = fir.load %[[PA_DESC]] : !fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>>
! CHECK: %[[PA_COORD:.*]] = fir.coordinate_of %[[PA_LOAD]], %{{.*}} : (!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>, i64) -> !fir.ref<!fir.type<_QMpolyTp1{a:i32,b:i32}>>
@@ -165,8 +165,8 @@ subroutine test_pointer()
! CHECK: %[[SLICE:.*]] = fir.slice %[[C2_INDEX]], %[[C4_INDEX]], %[[C1_INDEX]] : (index, index, index) -> !fir.slice<1>
! CHECK: %[[SLICE_REBOX:.*]] = fir.rebox %[[C4_LOAD]](%[[SHIFT]]) [%[[SLICE]]] : (!fir.class<!fir.heap<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>, !fir.shift<1>, !fir.slice<1>) -> !fir.class<!fir.array<3x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>
! CHECK: %[[PA_CONV:.*]] = fir.convert %[[PA_DESC]] : (!fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>>) -> !fir.ref<!fir.box<none>>
-! CHECK: %[[SLICE_REBOX_CONV:.*]] = fir.convert %[[SLICE_REBOX]] : (!fir.class<!fir.array<3x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>) -> !fir.box<none>
-! CHECK: fir.call @_FortranAPointerAssociate(%[[PA_CONV]], %[[SLICE_REBOX_CONV]]) {{.*}} : (!fir.ref<!fir.box<none>>, !fir.box<none>) -> ()
+! CHECK: %[[SLICE_REBOX_CONV:.*]] = fir.convert %[[SLICE_REBOX]] : (!fir.class<!fir.array<3x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>) -> !fir.box<none>
+! CHECK: fir.call @_FortranAPointerAssociate(%[[PA_CONV]], %[[SLICE_REBOX_CONV]]) {{.*}} : (!fir.ref<!fir.box<none>>, !fir.box<none>) -> ()
! CHECK-LABEL: fir.do_loop
! CHECK: %[[PA_LOAD:.*]] = fir.load %[[PA_DESC]] : !fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>>
! CHECK: %[[PA_COORD:.*]] = fir.coordinate_of %[[PA_LOAD]], %{{.*}} : (!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>, i64) -> !fir.ref<!fir.type<_QMpolyTp1{a:i32,b:i32}>>
diff --git a/flang/test/Lower/pointer-disassociate.f90 b/flang/test/Lower/pointer-disassociate.f90
index fb70fd7795b2e..6dfabddb83291 100644
--- a/flang/test/Lower/pointer-disassociate.f90
+++ b/flang/test/Lower/pointer-disassociate.f90
@@ -113,9 +113,9 @@ subroutine test_polymorphic_null(p)
end subroutine
! CHECK-LABEL: func.func @_QPtest_polymorphic_null(
! CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QFtest_polymorphic_nullTt>>>>>
-! CHECK: %[[VAL_1:.*]] = fir.type_desc !fir.type<_QFtest_polymorphic_nullTt>
+! CHECK: %[[VAL_1:.*]] = fir.type_desc !fir.type<_QFtest_polymorphic_nullTt>
! CHECK: %[[VAL_2:.*]] = fir.convert %[[VAL_0]] : (!fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QFtest_polymorphic_nullTt>>>>>) -> !fir.ref<!fir.box<none>>
-! CHECK: %[[VAL_3:.*]] = fir.convert %[[VAL_1]] : (!fir.tdesc<!fir.type<_QFtest_polymorphic_nullTt>>) -> !fir.ref<none>
+! CHECK: %[[VAL_3:.*]] = fir.convert %[[VAL_1]] : (!fir.tdesc<!fir.type<_QFtest_polymorphic_nullTt>>) -> !fir.ref<none>
! CHECK: %[[VAL_4:.*]] = arith.constant 1 : i32
! CHECK: %[[VAL_5:.*]] = arith.constant 0 : i32
! CHECK: fir.call @_FortranAPointerNullifyDerived(%[[VAL_2]], %[[VAL_3]], %[[VAL_4]], %[[VAL_5]]) {{.*}}: (!fir.ref<!fir.box<none>>, !fir.ref<none>, i32, i32) -> ()
diff --git a/flang/test/Lower/polymorphic-temp.f90 b/flang/test/Lower/polymorphic-temp.f90
index ac3cbdba6646d..391ec2b48a1be 100644
--- a/flang/test/Lower/polymorphic-temp.f90
+++ b/flang/test/Lower/polymorphic-temp.f90
@@ -24,7 +24,7 @@ subroutine test_temp_from_intrinsic_spread()
call pass_unlimited_poly_1d(spread(p, dim=1, ncopies=2))
call pass_unlimited_poly_1d(spread(pa(1), dim=1, ncopies=2))
-
+
end subroutine
! CHECK-LABEL: func.func @_QMpoly_tmpPtest_temp_from_intrinsic_spread() {
@@ -220,7 +220,7 @@ subroutine test_merge_intrinsic2(a, b, i)
! CHECK: %[[LOAD_I:.*]] = fir.load %[[I]] : !fir.ref<i32>
! CHECK: %[[C1:.*]] = arith.constant 1 : i32
! CHECK: %[[CMPI:.*]] = arith.cmpi eq, %[[LOAD_I]], %[[C1]] : i32
-! CHECK: %[[A_REBOX:.*]] = fir.rebox %[[LOAD_A]] : (!fir.class<!fir.heap<!fir.type<_QMpoly_tmpTp1{a:i32}>>>) -> !fir.box<!fir.heap<!fir.type<_QMpoly_tmpTp1{a:i32}>>>
+! CHECK: %[[A_REBOX:.*]] = fir.rebox %[[LOAD_A]] : (!fir.class<!fir.heap<!fir.type<_QMpoly_tmpTp1{a:i32}>>>) -> !fir.box<!fir.heap<!fir.type<_QMpoly_tmpTp1{a:i32}>>>
! CHECK: %{{.*}} = arith.select %[[CMPI]], %[[A_REBOX]], %[[LOAD_B]] : !fir.box<!fir.heap<!fir.type<_QMpoly_tmpTp1{a:i32}>>>
subroutine check_unlimited_poly(a)
diff --git a/flang/test/Lower/polymorphic-types.f90 b/flang/test/Lower/polymorphic-types.f90
index a06e0a29b6ae8..93d08a4aee380 100644
--- a/flang/test/Lower/polymorphic-types.f90
+++ b/flang/test/Lower/polymorphic-types.f90
@@ -1,6 +1,6 @@
! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s
-! Tests the different possible type involving polymorphic entities.
+! Tests the different possible type involving polymorphic entities.
module polymorphic_types
type p1
diff --git a/flang/test/Lower/polymorphic.f90 b/flang/test/Lower/polymorphic.f90
index bc4eed54282df..689e2233dcf10 100644
--- a/flang/test/Lower/polymorphic.f90
+++ b/flang/test/Lower/polymorphic.f90
@@ -126,7 +126,7 @@ subroutine check()
! CHECK: %[[CLASS1:.*]] = fir.embox %[[DT1]] : (!fir.ref<!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>>) -> !fir.class<!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>>
! CHECK: fir.call @_QMpolymorphic_testPprint(%[[CLASS1]]) {{.*}}: (!fir.class<!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>>) -> ()
! CHECK: %[[BOX2:.*]] = fir.embox %[[DT2]] : (!fir.ref<!fir.type<_QMpolymorphic_testTp2{a:i32,b:i32,c:f32}>>) -> !fir.class<!fir.type<_QMpolymorphic_testTp2{a:i32,b:i32,c:f32}>>
-! CHECK: %[[CLASS2:.*]] = fir.convert %[[BOX2]] : (!fir.class<!fir.type<_QMpolymorphic_testTp2{a:i32,b:i32,c:f32}>>) -> !fir.class<!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>>
+! CHECK: %[[CLASS2:.*]] = fir.convert %[[BOX2]] : (!fir.class<!fir.type<_QMpolymorphic_testTp2{a:i32,b:i32,c:f32}>>) -> !fir.class<!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>>
! CHECK: fir.call @_QMpolymorphic_testPprint(%[[CLASS2]]) {{.*}}: (!fir.class<!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>>) -> ()
subroutine test_allocate_unlimited_polymorphic_non_derived()
@@ -316,7 +316,7 @@ subroutine nullify_pointer_array(a)
! CHECK-LABEL: func.func @_QMpolymorphic_testPnullify_pointer_array(
! CHECK-SAME: %[[ARG0:.*]]: !fir.ref<!fir.type<_QMpolymorphic_testTp3{p:!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolymorphic_testTp3>>>>}>> {fir.bindc_name = "a"}) {
! CHECK: %[[COORD_P:.*]] = fir.coordinate_of %[[ARG0]], p : (!fir.ref<!fir.type<_QMpolymorphic_testTp3{p:!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolymorphic_testTp3>>>>}>>) -> !fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolymorphic_testTp3{p:!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolymorphic_testTp3>>>>}>>>>>
-! CHECK: %[[TYPE_DESC:.*]] = fir.type_desc !fir.type<_QMpolymorphic_testTp3{p:!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolymorphic_testTp3>>>>}>
+! CHECK: %[[TYPE_DESC:.*]] = fir.type_desc !fir.type<_QMpolymorphic_testTp3{p:!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolymorphic_testTp3>>>>}>
! CHECK: %[[CONV_P:.*]] = fir.convert %[[COORD_P]] : (!fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolymorphic_testTp3{p:!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolymorphic_testTp3>>>>}>>>>>) -> !fir.ref<!fir.box<none>>
! CHECK: %[[CONV_TDESC:.*]] = fir.convert %[[TYPE_DESC]] : (!fir.tdesc<!fir.type<_QMpolymorphic_testTp3{p:!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolymorphic_testTp3>>>>}>>) -> !fir.ref<none>
! CHECK: %[[C1:.*]] = arith.constant 1 : i32
@@ -517,7 +517,7 @@ subroutine test_elemental_assign()
subroutine host_assoc(this)
class(p1) :: this
-
+
call internal
contains
subroutine internal
@@ -779,7 +779,7 @@ function unlimited_polymorphic_alloc_array_ret()
subroutine test_unlimited_polymorphic_alloc_array_ret()
select type (a => unlimited_polymorphic_alloc_array_ret())
type is (real)
- print*, 'type is real'
+ print*, 'type is real'
end select
end subroutine
@@ -795,7 +795,7 @@ subroutine test_unlimited_polymorphic_intentout(a)
! CHECK-LABEL: func.func @_QMpolymorphic_testPtest_unlimited_polymorphic_intentout(
! CHECK-SAME: %[[ARG0:.*]]: !fir.class<none> {fir.bindc_name = "a"}) {
! CHECK: %[[BOX_NONE:.*]] = fir.convert %[[ARG0]] : (!fir.class<none>) -> !fir.box<none>
-! CHECK: fir.call @_FortranADestroy(%[[BOX_NONE]]) {{.*}} : (!fir.box<none>) -> ()
+! CHECK: fir.call @_FortranADestroy(%[[BOX_NONE]]) {{.*}} : (!fir.box<none>) -> ()
! CHECK: %[[BOX_NONE:.*]] = fir.convert %[[ARG0]] : (!fir.class<none>) -> !fir.box<none>
! CHECK: fir.call @_FortranAInitialize(%[[BOX_NONE]], %{{.*}}, %{{.*}}) {{.*}} : (!fir.box<none>, !fir.ref<i8>, i32) -> ()
@@ -806,7 +806,7 @@ subroutine test_polymorphic_intentout(a)
! CHECK-LABEL: func.func @_QMpolymorphic_testPtest_polymorphic_intentout(
! CHECK-SAME: %[[ARG0:.*]]: !fir.class<!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>> {fir.bindc_name = "a"}) {
! CHECK: %[[BOX_NONE:.*]] = fir.convert %[[ARG0]] : (!fir.class<!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>>) -> !fir.box<none>
-! CHECK: fir.call @_FortranADestroy(%[[BOX_NONE]]) {{.*}} : (!fir.box<none>) -> ()
+! CHECK: fir.call @_FortranADestroy(%[[BOX_NONE]]) {{.*}} : (!fir.box<none>) -> ()
! CHECK: %[[BOX_NONE:.*]] = fir.convert %[[ARG0]] : (!fir.class<!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>>) -> !fir.box<none>
! CHECK: fir.call @_FortranAInitialize(%[[BOX_NONE]], %{{.*}}, %{{.*}}) {{.*}} : (!fir.box<none>, !fir.ref<i8>, i32) -> ()
diff --git a/flang/test/Lower/pre-fir-tree02.f90 b/flang/test/Lower/pre-fir-tree02.f90
index 65c33e9b364fe..d61dc801eea60 100644
--- a/flang/test/Lower/pre-fir-tree02.f90
+++ b/flang/test/Lower/pre-fir-tree02.f90
@@ -148,7 +148,7 @@ subroutine incr(i)
module test
!! When derived type processing is implemented, remove all instances of:
!! - !![disable]
- !! - COM:
+ !! - COM:
!![disable]type :: a_type
!![disable] ...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/168723
More information about the flang-commits
mailing list