source: CIVL/examples/omp/dataracebench-1.3.2/micro-benchmarks-fortran/DRB081-func-arg-orig-no.f95

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100755
File size: 940 bytes
RevLine 
[e3f356c]1!!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!!!
2!!! Copyright (c) 2017-20, Lawrence Livermore National Security, LLC
3!!! and DataRaceBench project contributors. See the DataRaceBench/COPYRIGHT file for details.
4!!!
5!!! SPDX-License-Identifier: (BSD-3-Clause)
6!!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!!!
7
8!A function argument passed by value should be private inside the function.
9!Variable i is read only. No data race pairs.
10
11module global
12 implicit none
13 contains
14 subroutine f1(i)
15 integer, value :: i
16 i = i+1
17 end subroutine f1
18end module global
19
20program DRB080_func_arg_orig_yes
21 use omp_lib
22 use global
23 implicit none
24
25 integer :: i
26 i = 0
27
28 !$omp parallel
29 call f1(i)
30 !$omp end parallel
31
32 if (i /= 0) then
33 print 100, i
34 100 format ('i =',i3)
35 end if
36end program
Note: See TracBrowser for help on using the repository browser.