Skip to content

[flang][OpenMP] Assertion failure in incorrect use of default clause #93437

@NimishMishra

Description

@NimishMishra

The following reproducer uses default clause on a disallowed directive

program main
  integer, dimension(100) :: a
  integer :: i
  !$omp do ordered default(private)
  do i = 2, 10
    !$omp ordered
    a(i) = a(i-1) + 1
    !$omp end ordered
  end do
  !$omp end do
end program main

LLVM Flang crashes with the following assertion failure: parallelDir || taskGenDir || llvm::omp::allTeamsSet.test(dirContext.directive)

gfortran, on the other hand, exits with a semantic error.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions