Description
Consider the following program.
program nowait_reproducer
implicit none
real x
!$omp target map(tofrom: x) nowait
x = 5
!$omp end target
end program nowait_reproducer
Compiling it with the following cause the compiler to crash
flang -fopenmp test.f90
Note that adding --offload-arch makes the crash go away. The call stack of the crash site looks like as follows:
llvm::CallInst::init
llvm::IRBuilderBase::CreateCall
llvm::OpenMPIRBuilder::emitTargetTask
llvm::OpenMPIRBuilder::finalize
mlir::LLVM::ModuleTranslation::~ModuleTranslation