Skip to content

[flang][OpenMP] Compiler crash with nowait on target construct #124578

@abidh

Description

@abidh

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

Metadata

Metadata

Assignees

Labels

crashPrefer [crash-on-valid] or [crash-on-invalid]llvm:openmpirbuilderIssues related to problems in the llvm-project/lib/Frontend/OpenMP/OMPIRBuilder.cpp

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions