aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c/pr80394.c
blob: 6c5a740185151a7fcbc284003acbc83a78cc0fe9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* PR libgomp/80394 */

int
main ()
{
  int x = 0;
  #pragma omp parallel shared(x)
  #pragma omp single
  {
    #pragma omp task depend(inout: x)
    {
      for (int i = 0; i < 100000; i++)
        asm volatile ("" : : : "memory");
      x += 5;
    }
    #pragma omp task if (0) depend(inout: x)
    ;
    if (x != 5)
      __builtin_abort ();
  }
  return 0;
}