brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.7 KiB · 0ee7fa0 Raw
77 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12subroutine s(n,m,a,l,c)3  integer, intent(in) :: n4  integer, device, intent(in) :: m(n)5  real, device, intent(in) :: a(n)6  logical, device, intent(in) :: l(n)7  integer j, mr8  real ar9  logical lr10  complex :: cr11  complex, device, intent(in) :: c(n)12!$cuf kernel do <<<*,*>>> reduce (+:mr,ar)13  do j=1,n; mr = mr + m(j); ar = ar + a(j); end do14!ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type LOGICAL(4)15!$cuf kernel do <<<*,*>>> reduce (+:lr)16  do j=1,n; end do17!$cuf kernel do <<<*,*>>> reduce (*:mr,ar)18  do j=1,n; mr = mr * m(j); ar = ar * a(j); end do19!ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type LOGICAL(4)20!$cuf kernel do <<<*,*>>> reduce (*:lr)21  do j=1,n; end do22!$cuf kernel do <<<*,*>>> reduce (max:mr,ar)23  do j=1,n; mr = max(mr,m(j)); ar = max(ar,a(j)); end do24!ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type LOGICAL(4)25!$cuf kernel do <<<*,*>>> reduce (max:lr)26  do j=1,n; end do27!$cuf kernel do <<<*,*>>> reduce (min:mr,ar)28  do j=1,n; mr = min(mr,m(j)); ar = min(ar,a(j)); end do29!ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type LOGICAL(4)30!$cuf kernel do <<<*,*>>> reduce (min:lr)31  do j=1,n; end do32!$cuf kernel do <<<*,*>>> reduce (iand:mr)33  do j=1,n; mr = iand(mr,m(j)); end do34!ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type REAL(4)35!ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type LOGICAL(4)36!$cuf kernel do <<<*,*>>> reduce (iand:ar,lr)37  do j=1,n; end do38!$cuf kernel do <<<*,*>>> reduce (ieor:mr)39  do j=1,n; mr = ieor(mr,m(j)); end do40!ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type REAL(4)41!ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type LOGICAL(4)42!$cuf kernel do <<<*,*>>> reduce (ieor:ar,lr)43  do j=1,n; end do44!$cuf kernel do <<<*,*>>> reduce (ior:mr)45  do j=1,n; mr = ior(mr,m(j)); end do46!ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type REAL(4)47!ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type LOGICAL(4)48!$cuf kernel do <<<*,*>>> reduce (ior:ar,lr)49  do j=1,n; end do50!$cuf kernel do <<<*,*>>> reduce (.and.:lr)51  do j=1,n; lr = lr .and. l(j); end do52!ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type INTEGER(4)53!ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type REAL(4)54!$cuf kernel do <<<*,*>>> reduce (.and.:mr,ar)55  do j=1,n; end do56!$cuf kernel do <<<*,*>>> reduce (.eqv.:lr)57  do j=1,n; lr = lr .eqv. l(j); end do58!ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type INTEGER(4)59!ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type REAL(4)60!$cuf kernel do <<<*,*>>> reduce (.eqv.:mr,ar)61  do j=1,n; end do62!$cuf kernel do <<<*,*>>> reduce (.neqv.:lr)63  do j=1,n; lr = lr .neqv. l(j); end do64!ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type INTEGER(4)65!ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type REAL(4)66!$cuf kernel do <<<*,*>>> reduce (.neqv.:mr,ar)67  do j=1,n; end do68!$cuf kernel do <<<*,*>>> reduce (.or.:lr)69  do j=1,n; lr = lr .or. l(j); end do70!ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type INTEGER(4)71!ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type REAL(4)72!$cuf kernel do <<<*,*>>> reduce (.or.:mr,ar)73  do j=1,n; end do74!$cuf kernel do <<<*,*>>> reduce (+:cr) ! ok complex type75  do j=1,n; cr = cr + c(j); end do76end77