Skip to content

Commit 174abf6

Browse files
committed
add comment
1 parent fe965f6 commit 174abf6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

flang/lib/Lower/OpenMP/DataSharingProcessor.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,10 @@ void DataSharingProcessor::doPrivatize(const semantics::Symbol *sym,
552552
mlir::Value cloneAddr = symTable->shallowLookupSymbol(*sym).getAddr();
553553
mlir::Type cloneType = cloneAddr.getType();
554554

555+
// A `convert` op is required for variables that are storage associated
556+
// via `equivalence`. The problem is that these variables are declared as
557+
// `fir.ptr`s while their privatized storage is declared as `fir.ref`,
558+
// therefore we convert to proper symbol type.
555559
mlir::Value yieldedValue =
556560
(symType == cloneType) ? cloneAddr
557561
: firOpBuilder.createConvert(

0 commit comments

Comments
 (0)