[flang-commits] [PATCH] D124622: [flang] Handle common block with different sizes in same file

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Apr 28 09:15:54 PDT 2022


klausler accepted this revision.
klausler added a comment.
This revision is now accepted and ready to land.

Looks great.  Could you add comments to docs/Extensions.md to describe that (1) initializations of common outside BLOCK DATA and (2) initializations of blank COMMON are both non-standard, but are near-universal extensions that we have to support?  Thanks.



================
Comment at: flang/include/flang/Lower/PFTBuilder.h:32
+namespace Fortran::semantics {
+using CommonBlockList = std::vector<std::pair<SymbolRef, std::size_t>>;
+}
----------------
It seems a little risky to define this typedef in two distinct header files; what if one of them changes?


================
Comment at: flang/include/flang/Semantics/semantics.h:208
+  // This can obviously not check any conflicts between different compilation
+  // units (in case such conflicts exist, the behavior will depend of the
+  // linker).
----------------
"depend on" or "depend upon"


================
Comment at: flang/test/Lower/common-block-2.f90:19
+
+subroutine first_appreance
+  real :: x, y, xa, ya
----------------
"appearance"


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124622



More information about the flang-commits mailing list