Mercurial > hg > CbC > CbC_gcc
view libgomp/testsuite/libgomp.fortran/crayptr2.f90 @ 55:77e2b8dfacca gcc-4.4.5
update it from 4.4.3 to 4.5.0
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Feb 2010 23:39:51 +0900 |
parents | a06113de4d67 |
children | 04ced10e8804 |
line wrap: on
line source
! { dg-do run } ! { dg-options "-fopenmp -fcray-pointer" } ! { dg-require-effective-target tls_runtime } use omp_lib integer :: a, b, c, d, p logical :: l pointer (ip, p) save ip !$omp threadprivate (ip) a = 1 b = 2 c = 3 l = .false. !$omp parallel num_threads (3) reduction (.or.:l) if (omp_get_thread_num () .eq. 0) then ip = loc (a) elseif (omp_get_thread_num () .eq. 1) then ip = loc (b) else ip = loc (c) end if l = p .ne. omp_get_thread_num () + 1 !$omp single d = omp_get_thread_num () !$omp end single copyprivate (d, ip) l = l .or. (p .ne. d + 1) !$omp end parallel if (l) call abort end