| 1 |
! RUN: %not_todo_cmd bbc -emit-fir -fopenmp -o - %s 2>&1 | FileCheck %s |
| 2 |
! RUN: %not_todo_cmd %flang_fc1 -emit-fir -fopenmp -o - %s 2>&1 | FileCheck %s |
| 3 |
|
| 4 |
! There's no definition of '+' for type(t) |
| 5 |
! CHECK: The type of 'mt' is incompatible with the reduction operator. |
| 6 |
subroutine reduction_allocatable |
| 7 |
type t |
| 8 |
integer :: x |
| 9 |
end type |
| 10 |
integer :: i = 1 |
| 11 |
type(t) :: mt |
| 12 |
|
| 13 |
mt%x = 0 |
| 14 |
|
| 15 |
!$omp parallel num_threads(4) |
| 16 |
!$omp do reduction(+:mt) |
| 17 |
do i = 1, 10 |
| 18 |
mt%x = mt%x + i |
| 19 |
enddo |
| 20 |
!$omp end do |
| 21 |
!$omp end parallel |
| 22 |
end subroutine |