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 c5f2351 commit a109d6dCopy full SHA for a109d6d
flang/lib/Optimizer/Builder/IntrinsicCall.cpp
@@ -3262,7 +3262,8 @@ void IntrinsicLibrary::genCFPointer(llvm::ArrayRef<fir::ExtendedValue> args) {
3262
// to be synced.
3263
if (auto declare = mlir::dyn_cast_or_null<hlfir::DeclareOp>(
3264
fPtr->getAddr().getDefiningOp()))
3265
- if (mlir::isa<fir::AddrOfOp>(declare.getMemref().getDefiningOp()))
+ if (declare.getMemref().getDefiningOp() &&
3266
+ mlir::isa<fir::AddrOfOp>(declare.getMemref().getDefiningOp()))
3267
if (cuf::isRegisteredDeviceAttr(declare.getDataAttr()) &&
3268
!cuf::isCUDADeviceContext(builder.getRegion()))
3269
fir::runtime::cuda::genSyncGlobalDescriptor(builder, loc,
0 commit comments