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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgomp/] [testsuite/] [libgomp.fortran/] [task3.f90] - Blame information for rev 741

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

Line No. Rev Author Line
1 735 jeremybenn
! { dg-do run }
2
! { dg-options "-fopenmp" }
3
!
4
! PR fortran/47886
5
!
6
! Test case contributed by Bill Long
7
 
8
!  derived from OpenMP test OMP3f/F03_2_7_1d.F90
9
program F03_2_7_1d
10
   use omp_lib
11
   implicit none
12
   integer, parameter :: NT = 4
13
   integer :: sum = 0
14
 
15
   call omp_set_num_threads(NT);
16
 
17
   !$omp parallel
18
   !$omp task if(omp_get_num_threads() > 0)
19
   !$omp atomic
20
      sum = sum + 1
21
   !$omp end task
22
   !$omp end parallel
23
   if (sum /= NT) then
24
      print *, "FAIL - sum == ", sum, " (expected ", NT, ")"
25
      call abort
26
   end if
27
end program F03_2_7_1d

powered by: WebSVN 2.1.0

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