[flang-commits] [flang] [flang] Catch impure calls in nested concurrent-headers (PR #102075)
via flang-commits
flang-commits at lists.llvm.org
Mon Sep 2 22:20:00 PDT 2024
harishch4 wrote:
HI @klausler,
Shouldn't we treat DO CONCURRENT with multiple concurrent controls as nested loops and throw an error when impure functions are accessed, since we are generating nested DO loops in HLFIR?
```
do concurrent(i=1:n, j=1:impure(n*m, n/m))
a(i) = j
end do
```
```
fir.do_loop %arg1 = %44 to %46 step %c1 unordered {
...
fir.do_loop %arg2 = %48 to %58 step %c1_4 unordered {
...
}
}
```
full example: https://godbolt.org/z/KeGxMsEn6
https://github.com/llvm/llvm-project/pull/102075
More information about the flang-commits
mailing list