[PATCH] D100868: [flang] Fix assignment of parameterized derived types

Peter Klausler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 10:23:23 PDT 2021


klausler accepted this revision.
klausler added inline comments.
This revision is now accepted and ready to land.


================
Comment at: flang/lib/Semantics/tools.cpp:113
   } else {
-    const auto *lhsDerived{evaluate::GetDerivedTypeSpec(lhsType)};
-    const auto *rhsDerived{evaluate::GetDerivedTypeSpec(rhsType)};
-    if (lhsDerived && rhsDerived && *lhsDerived == *rhsDerived) {
-      return Tristate::Maybe; // TYPE(t) = TYPE(t) can be defined or
-                              // intrinsic
+    if (MightHaveCompatibleDerivedtypes(lhsType, rhsType)) {
+      return Tristate::Maybe; // TYPE(t) = TYPE(t) can be defined or intrinsic
----------------
Minor: you can decrease the amount of block nesting here now, if you like, with an `else if`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100868



More information about the llvm-commits mailing list