[PATCH] D97201: [flang] Detect circularly defined interfaces of procedures

Pete Steinfeld via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 22 09:21:44 PST 2021


PeteSteinfeld added inline comments.


================
Comment at: flang/include/flang/Semantics/symbol.h:597
   bool operator!=(const Symbol &that) const { return !(*this == that); }
-  bool operator<(const Symbol &that) const {
-    // For sets of symbols: collate them by source location
-    return name_.begin() < that.name_.begin();
-  }
+  // For sets of symbols (SymbolSet): collate them by address since their
+  // source location can change
----------------
klausler wrote:
> Heap addresses are arbitrary and cannot be expected to have relationships that are portable.  This change is going to lead to spurious test failures esp. across platforms.  You're going to have to order the symbols via the actual characters in their names instead.
Good catch.  Will do.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97201



More information about the llvm-commits mailing list