summaryrefslogtreecommitdiff
path: root/flang/lib/Lower/ConvertArrayConstructor.cpp
diff options
context:
space:
mode:
authorSlava Zakharin <szakharin@nvidia.com>2025-09-04 15:49:11 -0700
committerGitHub <noreply@github.com>2025-09-04 15:49:11 -0700
commit83da8d08ff110fd5bf3fff17043420ba442e300c (patch)
tree869a8f91da0a01348607ef1a8e156f64d8368362 /flang/lib/Lower/ConvertArrayConstructor.cpp
parent3dff9ac495d4ad98743f6cf267439d3a3c3b2d6b (diff)
[flang] Attach proper storage to [hl]fir.declare in lowering. (#155742)
As described in https://discourse.llvm.org/t/rfc-flang-representation-for-objects-inside-physical-storage/88026, `[hl]fir.declare` should carry information about the layout of COMMON/EQUIVALENCE variables within the physical storage. This patch modifes Flang lowering to attach this information.
Diffstat (limited to 'flang/lib/Lower/ConvertArrayConstructor.cpp')
-rw-r--r--flang/lib/Lower/ConvertArrayConstructor.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/flang/lib/Lower/ConvertArrayConstructor.cpp b/flang/lib/Lower/ConvertArrayConstructor.cpp
index 87824110b4a0..006f022b5379 100644
--- a/flang/lib/Lower/ConvertArrayConstructor.cpp
+++ b/flang/lib/Lower/ConvertArrayConstructor.cpp
@@ -315,9 +315,8 @@ public:
mlir::Value tempStorage = builder.createHeapTemporary(
loc, declaredType, tempName, extents, lengths);
mlir::Value shape = builder.genShape(loc, extents);
- declare = hlfir::DeclareOp::create(
- builder, loc, tempStorage, tempName, shape, lengths,
- /*dummy_scope=*/nullptr, fir::FortranVariableFlagsAttr{});
+ declare = hlfir::DeclareOp::create(builder, loc, tempStorage, tempName,
+ shape, lengths);
initialBoxValue =
builder.createBox(loc, boxType, declare->getOriginalBase(), shape,
/*slice=*/mlir::Value{}, lengths, /*tdesc=*/{});