[flang-commits] [flang] [flang][NFC] do not hard code KIND 10 and 16 in lowering tests (PR #124966)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Thu Jan 30 02:49:25 PST 2025
================
@@ -132,15 +136,19 @@ real(16) function rfct6()
! CHECK-LABEL: func @_QPcplxfct4() -> complex<f64>
! CHECK: return %{{.*}} : complex<f64>
-complex(10) function cplxfct5()
+function cplxfct5()
+ integer, parameter :: kind10 = merge(10, 4, selected_real_kind(p=18).eq.10)
+ complex(kind10) :: cplxfct5
end
-! CHECK-LABEL: func @_QPcplxfct5() -> complex<f80>
-! CHECK: return %{{.*}} : complex<f80>
+! CHECK-KIND10-LABEL: func @_QPcplxfct5() -> complex<f80>
+! CHECK-KIND10: return %{{.*}} : complex<f80>
-complex(16) function cplxfct6()
+function cplxfct6()
+ integer, parameter :: kind16 = merge(16, 4, selected_real_kind(p=33).eq.16)
+ complex(kind16) :: cplxfct5
----------------
tblah wrote:
```suggestion
complex(kind16) :: cplxfct6
```
https://github.com/llvm/llvm-project/pull/124966
More information about the flang-commits
mailing list