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

main()
{
  int i = 0;

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

  if (i != 1)
    abort ();

  return 0;
}