[PATCH] D83491: [flang] Fix a crash when creating generics from a copy

Tim Keith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 11:07:03 PDT 2020


tskeith added inline comments.


================
Comment at: flang/lib/Semantics/symbol.cpp:211
+    }
+  }
 }
----------------
I think that `specificProcs_` and `bindingNames_` are supposed to be parallel vectors; at least that is the assumption in `CheckHelper::CheckGeneric`. So this should be written as a single loop that pushes onto the two lists at the same time. As it's written it looks like the two loops might push different numbers of elements on the two lists.

One thing that suggests that the above assumption is wrong is the existence of this constructor: `GenericDetails(const SymbolVector &specificProcs);`. But I'm not sure it is ever used, so it would be good if you can delete it as part of this change.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83491





More information about the llvm-commits mailing list