Skip to content

[flang][OpenMP] crash in OpenMPIRBuilder when trying to outline a parallel region with an infinite loop #112884

@tblah

Description

@tblah
program infinite_loop
  integer :: i
  !$omp parallel
  do
    i = 0
  end do
  !$omp end parallel
end program

This crashes in llvm::CodeExtractor::findAllocas called from llvm::OpenMPIRBuilder::createParallel. My guess is that the code extractor is looking for live out-values from the CFG region but gets stuck at the infinite loop.

Surprisingly, equivalent C code does not crash clang.

Reproduce with flang -fopenmp file.f90

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions