[flang-commits] [flang] [flang][openmp]Add UserReductionDetails and use in DECLARE REDUCTION (PR #131628)
Mats Petersson via flang-commits
flang-commits at lists.llvm.org
Fri Apr 4 09:39:53 PDT 2025
Leporacanthicus wrote:
> There is a case for UserReductionDetails that has to be added while writing a module file. The following test crashes in that code.
>
> ```
> module decl_red1
> type t1
> integer :: val
> end type t1
> interface operator(*)
> module procedure mul
> end interface
> !$omp declare reduction(*:t1:omp_out=omp_out*omp_in) initializer(omp_priv=t1(1))
> contains
> type(t1) function mul(v1, v2)
> type(t1), intent (in):: v1, v2
> mul%val = v1%val * v2%val
> end function
> end module
> ```
Now works, and additional test added.
https://github.com/llvm/llvm-project/pull/131628
More information about the flang-commits
mailing list