From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1534) id E85873833000; Wed, 2 Jun 2021 09:48:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E85873833000 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Tobias Burnus To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-1158] Fortran/OpenMP: Add gfortran.dg/gomp/taskloop-2.f90 [PR99928] X-Act-Checkin: gcc X-Git-Author: Tobias Burnus X-Git-Refname: refs/heads/master X-Git-Oldrev: c3ab6266bc52c6d42bd1de015397b272515cf40c X-Git-Newrev: 9ca24bd34b6ac44c17f949d89ff60d0fd4665133 Message-Id: <20210602094835.E85873833000@sourceware.org> Date: Wed, 2 Jun 2021 09:48:35 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jun 2021 09:48:36 -0000 https://gcc.gnu.org/g:9ca24bd34b6ac44c17f949d89ff60d0fd4665133 commit r12-1158-g9ca24bd34b6ac44c17f949d89ff60d0fd4665133 Author: Tobias Burnus Date: Wed Jun 2 11:48:21 2021 +0200 Fortran/OpenMP: Add gfortran.dg/gomp/taskloop-2.f90 [PR99928] PR middle-end/99928 gcc/testsuite/ChangeLog * gfortran.dg/gomp/taskloop-2.f90: New. Diff: --- gcc/testsuite/gfortran.dg/gomp/taskloop-2.f90 | 72 +++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/gcc/testsuite/gfortran.dg/gomp/taskloop-2.f90 b/gcc/testsuite/gfortran.dg/gomp/taskloop-2.f90 new file mode 100644 index 00000000000..21427623584 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/taskloop-2.f90 @@ -0,0 +1,72 @@ +subroutine foo() +implicit none +integer :: i, r +!$omp taskloop reduction(task, +: r) ! { dg-error "Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } +do i = 1, 64 +end do +!$omp taskloop simd reduction(task, +: r) ! { dg-error "Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } +do i = 1, 64 +end do +!$omp master taskloop reduction(task, +: r) ! { dg-error "Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } +do i = 1, 64 +end do +!$omp master taskloop simd reduction(task, +: r) ! { dg-error "Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } +do i = 1, 64 +end do +!$omp parallel master taskloop reduction(task, +: r) ! { dg-error "Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } +do i = 1, 64 +end do +!$omp parallel master taskloop simd reduction(task, +: r) ! { dg-error "Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } +do i = 1, 64 +end do + +!$omp taskloop reduction(inscan, +: r) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } +do i = 1, 64 ! { dg-error "OMP SCAN between two structured-block-sequences" "" { target *-*-* } .-1 } +end do +!$omp taskloop simd reduction(inscan, +: r) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } +do i = 1, 64 ! { dg-error "OMP SCAN between two structured-block-sequences" "" { target *-*-* } .-1 } +end do +!$omp master taskloop reduction(inscan, +: r) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } +do i = 1, 64 +end do +!$omp master taskloop simd reduction(inscan, +: r) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } +do i = 1, 64 +end do +!$omp parallel master taskloop reduction(inscan, +: r) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } +do i = 1, 64 ! { dg-error "OMP SCAN between two structured-block-sequences" "" { target *-*-* } .-1 } +end do +!$omp parallel master taskloop simd reduction(inscan, +: r) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } +do i = 1, 64 ! { dg-error "OMP SCAN between two structured-block-sequences" "" { target *-*-* } .-1 } +end do +end + + +subroutine bar() +implicit none +integer :: i, r +r = 0 +!$omp parallel reduction(+:r) + !$omp master taskloop in_reduction(+:r) + do i = 1, 64 + end do + !$omp master taskloop simd in_reduction(+:r) + do i = 1, 64 + end do + !$omp master + !$omp taskloop in_reduction(+:r) + do i = 1, 64 + end do + !$omp taskloop simd in_reduction(+:r) + do i = 1, 64 + end do + !$omp end master +!$omp end parallel + +!$omp parallel master taskloop in_reduction(+:r) ! { dg-error "Failed to match clause" } + do i = 1, 64 + end do + +!$omp parallel master taskloop simd in_reduction(+:r) ! { dg-error "Failed to match clause" } + do i = 1, 64 + end do +end