[llvm-branch-commits] [flang] [flang][OpenMP] Implement loop nest parser (PR #168884)
Krzysztof Parzyszek via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Nov 20 09:32:35 PST 2025
kparzysz wrote:
> Would this work fine for loops like the following?
>
> ```
> !$omp do
> DO 10, I = 1, N
> ... loop body statements ...
> 10 A(I) = B(I) + C(I)
> ```
Yes.
```
subroutine f(a, b, c)
integer :: i, n
integer :: a(:), b(:), c(:)
!$omp do
DO 10, I = 1, N
continue
10 A(I) = B(I) + C(I)
end
```
`flang -fc1 -fdebug-unparse -fopenmp t.f90`
```
SUBROUTINE f (a, b, c)
INTEGER i, n
INTEGER a(:), b(:), c(:)
!$OMP DO
DO i=1_4,n
CONTINUE
10 a(int(i,kind=8))=b(int(i,kind=8))+c(int(i,kind=8))
END DO
END SUBROUTINE
```
https://github.com/llvm/llvm-project/pull/168884
More information about the llvm-branch-commits
mailing list