Skip to content

Outermost OpenMP do-loop and cycle fails to compile #1192

@Leporacanthicus

Description

@Leporacanthicus

As per comment in #1178:

program lineloop
  implicit none
  INTEGER ::  n
  
  !$OMP PARALLEL DO NUM_THREADS(2) SCHEDULE(STATIC,1) PRIVATE(n)
  DO n = 1, 2
     IF ( n > 2 )  CYCLE
  END DO
  !$OMP END PARALLEL DO
end program lineloop

fails with an assertion:

bbc: /data/f18-llvm-project/flang/lib/Lower/OpenMP.cpp:117: void createEmptyRegionBlocks(fir::FirOpBuilder &, std::list<Fortran::lower::pft::Evaluation> &): Assertion `eval.block->empty() && "block is not empty"' failed.

Metadata

Metadata

Labels

OpenMPLowering and codegen of OpenMP

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions