diff --git a/flang/runtime/type-info.cpp b/flang/runtime/type-info.cpp --- a/flang/runtime/type-info.cpp +++ b/flang/runtime/type-info.cpp @@ -91,7 +91,7 @@ if (cat == TypeCategory::Character) { std::size_t lengthInChars{0}; if (auto length{characterLen_.GetValue(&container)}) { - lengthInChars = static_cast(*length / kind_); + lengthInChars = static_cast(*length); } else { RUNTIME_CHECK( terminator, characterLen_.genre() == Value::Genre::Deferred);