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] verification of lowering to FIR failed with "'fir.store' op store value type must match memory reference type" #121290

Open
k-arrows opened this issue Dec 29, 2024 · 1 comment

Comments

@k-arrows
Copy link

Reproducible on Godbolt:
https://godbolt.org/z/j6o13x97x

Reproducer:

integer, pointer :: a
integer :: arr(20,10)
integer :: i

!$omp simd lastprivate(i)
do a = 1, 10
  do i = a, 20
    arr(i, a) = i + a
  end do
end do

end

Compilation error:

$ flang-new -fopenmp test.f90
flang-20: warning: OpenMP support in flang is still experimental [-Wexperimental-option]
warning: loc("/tmp/test.f90":1:1): OpenMP loop iteration variable cannot have more than 64 bits size and will be narrowed into 64 bits.
warning: loc("/tmp/test.f90":1:1): OpenMP loop iteration variable cannot have more than 64 bits size and will be narrowed into 64 bits.
error: loc("/tmp/test.f90":5:7): 'fir.store' op store value type must match memory reference type
error: verification of lowering to FIR failed
@github-actions github-actions bot added the flang Flang issues not falling into any other category label Dec 29, 2024
@k-arrows k-arrows added flang:openmp and removed flang Flang issues not falling into any other category labels Dec 29, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 29, 2024

@llvm/issue-subscribers-flang-ir

Author: None (k-arrows)

Reproducible on Godbolt: https://godbolt.org/z/j6o13x97x

Reproducer:

integer, pointer :: a
integer :: arr(20,10)
integer :: i

!$omp simd lastprivate(i)
do a = 1, 10
  do i = a, 20
    arr(i, a) = i + a
  end do
end do

end

Compilation error:

$ flang-new -fopenmp test.f90
flang-20: warning: OpenMP support in flang is still experimental [-Wexperimental-option]
warning: loc("/tmp/test.f90":1:1): OpenMP loop iteration variable cannot have more than 64 bits size and will be narrowed into 64 bits.
warning: loc("/tmp/test.f90":1:1): OpenMP loop iteration variable cannot have more than 64 bits size and will be narrowed into 64 bits.
error: loc("/tmp/test.f90":5:7): 'fir.store' op store value type must match memory reference type
error: verification of lowering to FIR failed

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

No branches or pull requests

3 participants