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][OpenACC] stop statement in one construct inside one acc region #61281

Open
PeixinQiao opened this issue Mar 9, 2023 · 4 comments
Open
Labels
bug Indicates an unexpected problem or unintended behavior flang:ir openacc

Comments

@PeixinQiao
Copy link
Contributor

PeixinQiao commented Mar 9, 2023

subroutine test_stop_in_region3()
  integer :: x
  !$acc parallel
    x = 3
    if (x > 1) stop x
  !$acc end parallel
end
$ bbc -emit-fir -fopenacc test.f90 
error: loc("/home/qpx/compilers/llvm-community/example/fix-exit-region/acc/test.f90":4:5): operation with block successors must terminate its parent block
FATAL: verification of lowering to FIR failed
@PeixinQiao PeixinQiao added flang:ir flang Flang issues not falling into any other category labels Mar 9, 2023
@llvmbot
Copy link
Collaborator

llvmbot commented Mar 9, 2023

@llvm/issue-subscribers-flang-ir

@clementval
Copy link
Contributor

Didn't you work on a patch for that (https://reviews.llvm.org/D129969)

@PeixinQiao
Copy link
Contributor Author

@clementval I am rebasing it. I found they are different problems. If the stop statement is in one OpenMP/OpenACC region, D129969 will handle it by removing fir.unreachable. If the stop statement is in one if construct and if construct is in one OpenMP/OpenACC region, the fir.unreachable will not be removed. This case is OK in OpenMP, but it crash in OpenACC.

@EugeneZelenko EugeneZelenko removed the flang Flang issues not falling into any other category label Mar 9, 2023
@psteinfeld psteinfeld added the bug Indicates an unexpected problem or unintended behavior label Jun 7, 2023
@llvmbot
Copy link
Collaborator

llvmbot commented Jun 7, 2023

@llvm/issue-subscribers-bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior flang:ir openacc
Projects
None yet
Development

No branches or pull requests

6 participants