Skip to content

[flang][OpenMP] Lowering crashes for composite distribute simd constructs with private clause #151159

@mrkajetanp

Description

@mrkajetanp

After recent changes to the lowering of composite do simd constructs, programs like the following no longer ignore the simd information.

program main
  integer, allocatable :: tmp
  allocate(tmp)
  !$omp teams distribute simd private(tmp)
  do i=1, 10
    tmp = tmp + 1
  end do
end program

Instead, they crash with:

error: loc("/repr.f90":4:9): 'omp.distribute' op loop wrapper does not contain exactly one nested op
error: verification of lowering to FIR failed

This only happens when the privatised variable needs a non-trivial privatiser, because delayed privatisation is not handled correctly.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions