Fix ifunc detection in target-supports.exp file.
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / lock-1.f90
blobd7d3e3fd6cc902d4f59c8bdc45aeb91318e2cf22
1 ! { dg-do run }
3 use omp_lib
5 integer (kind = omp_nest_lock_kind) :: lock
6 logical :: l
8 l = .false.
9 call omp_init_nest_lock (lock)
10 if (omp_test_nest_lock (lock) .ne. 1) call abort
11 if (omp_test_nest_lock (lock) .ne. 2) call abort
12 !$omp parallel if (.false.) reduction (.or.:l)
13 ! In OpenMP 2.5 this was supposed to return 3,
14 ! but in OpenMP 3.0 the parallel region has a different
15 ! task and omp_*_lock_t are owned by tasks, not by threads.
16 if (omp_test_nest_lock (lock) .ne. 0) l = .true.
17 !$omp end parallel
18 if (l) call abort
19 if (omp_test_nest_lock (lock) .ne. 3) call abort
20 call omp_unset_nest_lock (lock)
21 call omp_unset_nest_lock (lock)
22 call omp_unset_nest_lock (lock)
23 call omp_destroy_nest_lock (lock)
24 end