[flang-commits] [flang] a69cb78 - [flang] Hanlde COMPLEX 2/3/10 in runtime TypeCode(cat, kind)

Jean Perier via flang-commits flang-commits at lists.llvm.org
Tue Mar 15 01:31:01 PDT 2022


Author: Jean Perier
Date: 2022-03-15T09:26:14+01:00
New Revision: a69cb782423b415a651053b6841fbc6aee27fb76

URL: https://github.com/llvm/llvm-project/commit/a69cb782423b415a651053b6841fbc6aee27fb76
DIFF: https://github.com/llvm/llvm-project/commit/a69cb782423b415a651053b6841fbc6aee27fb76.diff

LOG: [flang] Hanlde COMPLEX 2/3/10 in runtime TypeCode(cat, kind)

Type codes for COMPLEX kinds 2, 3, and 10 were added in https://reviews.llvm.org/D117336
but handling for these kinds in TypeCode(cat, kind) has not been added
yet.

Differential Revision: https://reviews.llvm.org/D121587

Added: 
    

Modified: 
    flang/runtime/type-code.cpp

Removed: 
    


################################################################################
diff  --git a/flang/runtime/type-code.cpp b/flang/runtime/type-code.cpp
index 7acff93deac1c..bfa6416899e3f 100644
--- a/flang/runtime/type-code.cpp
+++ b/flang/runtime/type-code.cpp
@@ -55,6 +55,12 @@ TypeCode::TypeCode(TypeCategory f, int kind) {
     break;
   case TypeCategory::Complex:
     switch (kind) {
+    case 2:
+      raw_ = CFI_type_half_float_Complex;
+      break;
+    case 3:
+      raw_ = CFI_type_bfloat_Complex;
+      break;
     case 4:
       raw_ = CFI_type_float_Complex;
       break;
@@ -62,6 +68,8 @@ TypeCode::TypeCode(TypeCategory f, int kind) {
       raw_ = CFI_type_double_Complex;
       break;
     case 10:
+      raw_ = CFI_type_extended_double_Complex;
+      break;
     case 16:
       raw_ = CFI_type_long_double_Complex;
       break;


        


More information about the flang-commits mailing list