summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c/omp-single-1.c
blob: a44ca54ace7c681e633200238c946e15a5970a1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
extern void abort (void);

main()
{
  int i = 0;

  #pragma omp parallel shared (i)
    {
      #pragma omp single
	{
	  i++;
	}
    }

  if (i != 1)
    abort ();

  return 0;
}