@@ -224,8 +224,7 @@ class HlfirDesignatorBuilder {
224224 /* namedConstantSectionsAreAlwaysContiguous=*/ false ))
225225 return fir::BoxType::get (resultValueType);
226226
227- // TODO: handle async references
228- bool isVolatile = false , isAsync = false ;
227+ bool isVolatile = false ;
229228
230229 // Check if the base type is volatile
231230 if (partInfo.base .has_value ()) {
@@ -247,13 +246,13 @@ class HlfirDesignatorBuilder {
247246 if (isVolatileSymbol (designatorNode.GetLastSymbol ()))
248247 isVolatile = true ;
249248 }
250-
249+
251250 // If it's a reference to a ref, account for it
252251 if (auto refTy = mlir::dyn_cast<fir::ReferenceType>(resultValueType))
253252 resultValueType = refTy.getEleTy ();
254253
255254 // Other designators can be handled as raw addresses.
256- return fir::ReferenceType::get (resultValueType, isVolatile, isAsync );
255+ return fir::ReferenceType::get (resultValueType, isVolatile);
257256 }
258257
259258 template <typename T>
@@ -298,7 +297,6 @@ class HlfirDesignatorBuilder {
298297 partInfo.componentName , partInfo.componentShape , partInfo.subscripts ,
299298 partInfo.substring , partInfo.complexPart , partInfo.resultShape ,
300299 partInfo.typeParams , attributes);
301- llvm::dbgs () << __FILE__ << " :" << __LINE__ << " \n " << designate << " \n " << designatorType << " \n " ;
302300 if (auto elementalAddrOp = getVectorSubscriptElementAddrOp ())
303301 builder.setInsertionPoint (*elementalAddrOp);
304302 return mlir::cast<fir::FortranVariableOpInterface>(
@@ -1829,7 +1827,6 @@ class HlfirBuilder {
18291827 /* complexPart=*/ std::nullopt ,
18301828 /* shape=*/ mlir::Value{}, /* typeParams=*/ mlir::ValueRange{},
18311829 fir::FortranVariableFlagsAttr{});
1832- llvm::dbgs () << __LINE__ << " " << newParent << " \n " ;
18331830 currentParent = hlfir::EntityWithAttributes{newParent};
18341831 }
18351832 valuesAndParents.emplace_back (
@@ -1853,6 +1850,7 @@ class HlfirBuilder {
18531850 assert (compType && " failed to retrieve component type" );
18541851 mlir::Value compShape =
18551852 designatorBuilder.genComponentShape (sym, compType);
1853+ mlir::Type designatorType = builder.getRefType (compType, isVolatile);
18561854
18571855 mlir::Type fieldElemType = hlfir::getFortranElementType (compType);
18581856 llvm::SmallVector<mlir::Value, 1 > typeParams;
@@ -1873,7 +1871,6 @@ class HlfirBuilder {
18731871 // Convert component symbol attributes to variable attributes.
18741872 fir::FortranVariableFlagsAttr attrs =
18751873 Fortran::lower::translateSymbolAttributes (builder.getContext (), sym);
1876- mlir::Type designatorType = builder.getRefType (compType, isVolatile);
18771874
18781875 // Get the component designator.
18791876 auto lhs = builder.create <hlfir::DesignateOp>(
@@ -1882,7 +1879,6 @@ class HlfirBuilder {
18821879 /* substring=*/ mlir::ValueRange{},
18831880 /* complexPart=*/ std::nullopt ,
18841881 /* shape=*/ compShape, typeParams, attrs);
1885- llvm::dbgs () << __LINE__ << " " << lhs << " \n " ;
18861882
18871883 if (attrs && bitEnumContainsAny (attrs.getFlags (),
18881884 fir::FortranVariableFlagsEnum::pointer)) {
0 commit comments