[flang-commits] [flang] [flang] Support fir.boxchar in getTypeAsString (PR #70997)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Wed Nov 1 15:41:05 PDT 2023


================
@@ -545,7 +545,9 @@ std::string getTypeAsString(mlir::Type ty, const fir::KindMapping &kindMap,
       break;
     } else if (auto charTy = mlir::dyn_cast_or_null<fir::CharacterType>(ty)) {
       name << 'c' << kindMap.getCharacterBitsize(charTy.getFKind());
-      if (charTy.getLen() != fir::CharacterType::singleton())
+      if (charTy.getLen() == fir::CharacterType::unknownLen())
+        name << "x?";
----------------
clementval wrote:

Yes we should! Thanks for catching this!

https://github.com/llvm/llvm-project/pull/70997


More information about the flang-commits mailing list