OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgomp/] [testsuite/] [libgomp.fortran/] [task3.f90] - Rev 801

Go to most recent revision | Compare with Previous | Blame | View Log

! { dg-do run }
! { dg-options "-fopenmp" }
!
! PR fortran/47886
!
! Test case contributed by Bill Long

!  derived from OpenMP test OMP3f/F03_2_7_1d.F90
program F03_2_7_1d
   use omp_lib
   implicit none
   integer, parameter :: NT = 4
   integer :: sum = 0

   call omp_set_num_threads(NT); 

   !$omp parallel
   !$omp task if(omp_get_num_threads() > 0)
   !$omp atomic
      sum = sum + 1
   !$omp end task
   !$omp end parallel
   if (sum /= NT) then
      print *, "FAIL - sum == ", sum, " (expected ", NT, ")"
      call abort
   end if
end program F03_2_7_1d

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.