source: CIVL/examples/omp/DataRaceBench/micro-benchmarks/outputdep-orig-yes.c@ e5cec5ae

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since e5cec5ae was 36a61f3, checked in by Ziqing Luo <ziqing@…>, 9 years ago

Commit DataRaceBench into CIVL examples

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

  • Property mode set to 100644
File size: 313 bytes
Line 
1// loop carried output dependence
2// x = .. :
3//
4// loop carried true dependence due to:
5// .. = x;
6// x = ..;
7#include <stdio.h>
8int a[100];
9
10int main()
11{
12 int len=100;
13 int i,x=10;
14
15#pragma omp parallel for
16 for (i=0;i<len;i++)
17 {
18 a[i] = x;
19 x=i;
20 }
21 printf("x=%d",x);
22 return 0;
23}
24
Note: See TracBrowser for help on using the repository browser.