source: CIVL/examples/omp/dataracebench-1.3.2/micro-benchmarks-fortran/DRB082-declared-in-func-orig-yes.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: 927 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 variable is declared inside a function called within a parallel region.
9!The variable should be shared if it uses static storage.
10!
11!Data race pair: q@19:7 vs. q@19:7
12
13module global_foo
14 use omp_lib
15 implicit none
16 contains
17 subroutine foo()
18 integer, save :: i
19 i = i+1
20 print*,i
21 end subroutine foo
22end module global_foo
23
24program DRB082_declared_in_func_orig_yes
25 use omp_lib
26 use global_foo
27 implicit none
28
29 !$omp parallel
30 call foo()
31 !$omp end parallel
32end program
Note: See TracBrowser for help on using the repository browser.