| Issue |
178614
|
| Summary |
[Flang] [OpenMP]: `declare reduction` with multiple types is not yet supported
|
| Labels |
flang
|
| Assignees |
|
| Reporter |
ravurvi20
|
```
flang version 23.0.0git
Target: x86_64-unknown-linux-gnu
```
In the attached program, when multiple types are specified in a single declare reduction it throws an error.
```
program main
implicit none
integer :: i, isum
real :: rsum
!$omp declare reduction(myred: integer, real : omp_out = omp_out + omp_in) initializer(omp_priv = 0)
isum = 0
rsum = 0.0
!$omp parallel do reduction(myred:isum)
do i = 1, 3
isum = isum + i
end do
!$omp parallel do reduction(myred:rsum)
do i = 1, 3
rsum = rsum + real(i)
end do
print *, isum, rsum
end program main
```
Compilation fails with:
```
error: not yet implemented: multiple types in declare reduction is not yet supported
```
Test case compiles successfully with gfortran and ifx. The limitation appears to originate from unimplemented handling of multiple types in: `flang/lib/Lower/OpenMP/OpenMP.cpp` as it is in TODO state.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs