We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2735369 commit 394dc51Copy full SHA for 394dc51
flang/lib/Lower/ConvertExprToHLFIR.cpp
@@ -465,7 +465,10 @@ class HlfirDesignatorBuilder {
465
// hlfir.designate result will be a pointer/allocatable.
466
PartInfo partInfo;
467
mlir::Type componentType = visitComponentImpl(component, partInfo).second;
468
- mlir::Type designatorType = fir::ReferenceType::get(componentType);
+ const auto isVolatile =
469
+ fir::isa_volatile_type(partInfo.base.value().getBase().getType());
470
+ mlir::Type designatorType =
471
+ fir::ReferenceType::get(componentType, isVolatile);
472
fir::FortranVariableFlagsAttr attributes =
473
Fortran::lower::translateSymbolAttributes(getBuilder().getContext(),
474
component.GetLastSymbol());
0 commit comments