Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flang][OpenMP] Diagnose invalid reduction modifiers #92397

Closed
kparzysz opened this issue May 16, 2024 · 2 comments · Fixed by #92406
Closed

[flang][OpenMP] Diagnose invalid reduction modifiers #92397

kparzysz opened this issue May 16, 2024 · 2 comments · Fixed by #92406

Comments

@kparzysz
Copy link
Contributor

Currently the flang frontend will accept the following code. The task modifier on the reduction clause is only valid for certain constructs, and simd is not one of them.

subroutine fred(x)
  integer, intent(inout) :: x

  !$omp simd reduction(task, +:x)
  do i = 1, 100
    x = foo(i)
  enddo
  !$omp end simd
end
@kparzysz kparzysz self-assigned this May 16, 2024
@github-actions github-actions bot added the flang Flang issues not falling into any other category label May 16, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented May 16, 2024

@llvm/issue-subscribers-openmp

Author: Krzysztof Parzyszek (kparzysz)

Currently the flang frontend will accept the following code. The `task` modifier on the `reduction` clause is only valid for certain constructs, and `simd` is not one of them.
subroutine fred(x)
  integer, intent(inout) :: x

  !$omp simd reduction(task, +:x)
  do i = 1, 100
    x = foo(i)
  enddo
  !$omp end simd
end

@EugeneZelenko EugeneZelenko added flang:frontend flang:openmp and removed openmp flang Flang issues not falling into any other category labels May 16, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented May 16, 2024

@llvm/issue-subscribers-flang-frontend

Author: Krzysztof Parzyszek (kparzysz)

Currently the flang frontend will accept the following code. The `task` modifier on the `reduction` clause is only valid for certain constructs, and `simd` is not one of them.
subroutine fred(x)
  integer, intent(inout) :: x

  !$omp simd reduction(task, +:x)
  do i = 1, 100
    x = foo(i)
  enddo
  !$omp end simd
end

kparzysz added a commit to kparzysz/llvm-project that referenced this issue May 16, 2024
Emit diagnostic messages for invalid modifiers in "reduction" clause.

Fixes llvm#92397
kparzysz added a commit that referenced this issue May 22, 2024
Emit diagnostic messages for invalid modifiers in "reduction" clause.

Fixes #92397
jameshu15869 pushed a commit to jameshu15869/llvm-project that referenced this issue May 31, 2024
Emit diagnostic messages for invalid modifiers in "reduction" clause.

Fixes llvm#92397
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants