[PATCH] D101482: [flang] Allow KIND type parameters to be used as LEN parameters of components

Peter Klausler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 28 13:14:53 PDT 2021


klausler added inline comments.


================
Comment at: flang/lib/Semantics/runtime-type-info.cpp:99
+            lenParam{evaluate::ExtractBareLenOrKindParameter(*expr)}) {
           return PackageIntValue(
               lenParameterEnum_, FindLenParameterIndex(*parameters, *lenParam));
----------------
`FindLenParameterIndex()` isn't going to return a meaningful result for a KIND type parameter.

I think the solution to this bug may have to be found at a higher level.  KIND type parameters should have been replaced with their constant values in each instantiation of a parameterized derived type.  The runtime type information tables should be generated only for derived type instantiations.  So a KIND type parameter shouldn't make it here in the first place.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101482/new/

https://reviews.llvm.org/D101482



More information about the llvm-commits mailing list