[flang-commits] [flang] [flang] Add structure constructor with allocatable component (PR #77845)

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Thu Jan 11 15:04:02 PST 2024


================
@@ -188,6 +188,12 @@ struct IsActuallyConstantHelper {
     return common::visit([this](const auto &y) { return (*this)(y); }, x.u);
   }
   bool operator()(const StructureConstructor &x) {
+    // If the comp-spec of a derived-type-spec is a structure constructor that
----------------
klausler wrote:

"derived-type-spec" is a grammar production associated with types.  I don't know how that can be relevant here.  And I think that `UnwrapExpr<Constant<SomeDerived>>(x)` will always be null -- if the subexpression is a structure constructor, it's not a `Constant` -- so the effect is to just return `false` for all structure constructors.  So I don't understand this part at all.  What are you trying to accomplish here?

https://github.com/llvm/llvm-project/pull/77845


More information about the flang-commits mailing list