void foo(void) {
  int i;
#pragma omp taskloop
  for (i = 0; i < 64; i++) {
    int j;
#pragma omp for
    for (j = 0; j < 10; j++)
      ;
#pragma omp single
    ;
#pragma omp sections
    {
#pragma omp section
      ;
    }
#pragma omp barrier
#pragma omp master
    ;
#pragma omp ordered
    ;
#pragma omp ordered threads
    ;
#pragma omp ordered simd threads
    ;
#pragma omp simd
    for (j = 0; j < 10; j++)
#pragma omp ordered simd
      ;
#pragma omp critical
    {
#pragma omp simd
      for (j = 0; j < 10; j++)
#pragma omp ordered simd
        ;
    }
  }
#pragma omp taskloop
  for (i = 0; i < 64; i++)
#pragma omp parallel
  {
    int j;
#pragma omp for
    for (j = 0; j < 10; j++)
      ;
#pragma omp single
    ;
#pragma omp sections
    {
#pragma omp section
      ;
    }
#pragma omp barrier
#pragma omp master
    ;
#pragma omp ordered
    ;
#pragma omp ordered threads
    ;
#pragma omp simd
    for (j = 0; j < 10; j++)
#pragma omp ordered simd
      ;
#pragma omp critical
    {
#pragma omp simd
      for (j = 0; j < 10; j++)
#pragma omp ordered simd
        ;
    }
  }
#pragma omp taskloop
  for (i = 0; i < 64; i++)
#pragma omp target
  {
    int j;
#pragma omp for
    for (j = 0; j < 10; j++)
      ;
#pragma omp single
    ;
#pragma omp sections
    {
#pragma omp section
      ;
    }
#pragma omp barrier
#pragma omp master
    ;
#pragma omp ordered
    ;
#pragma omp ordered threads
    ;
#pragma omp simd
    for (j = 0; j < 10; j++)
#pragma omp ordered simd
      ;
#pragma omp critical
    {
#pragma omp simd
      for (j = 0; j < 10; j++)
#pragma omp ordered simd
        ;
    }
  }
#pragma omp ordered
  {
#pragma omp ordered
    ;
  }
#pragma omp ordered threads
  {
#pragma omp ordered
    ;
  }
#pragma omp ordered
  {
#pragma omp ordered threads
    ;
  }
#pragma omp ordered threads
  {
#pragma omp ordered threads
    ;
  }
#pragma omp critical
  {
#pragma omp ordered simd
    ;
  }
#pragma omp for ordered
  for (i = 0; i < 64; i++)
#pragma omp parallel
  {
#pragma omp ordered threads
    ;
  }
#pragma omp for ordered
  for (i = 0; i < 64; i++)
#pragma omp parallel
  {
#pragma omp ordered
    ;
  }
#pragma omp for ordered(1)
  for (i = 0; i < 64; i++)
#pragma omp parallel
  {
#pragma omp ordered depend(source)
#pragma omp ordered depend(sink : i - 1)
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jge    1194 <foo+0x94>
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1139 <foo+0x39>
jmp    112b <foo+0x2b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111c <foo+0x1c>
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    115d <foo+0x5d>
jmp    114f <foo+0x4f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1140 <foo+0x40>
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1181 <foo+0x81>
jmp    1173 <foo+0x73>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1164 <foo+0x64>
jmp    1186 <foo+0x86>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <foo+0xb>
movl   $0x0,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jge    1224 <foo+0x124>
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    11c9 <foo+0xc9>
jmp    11bb <foo+0xbb>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11ac <foo+0xac>
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    11ed <foo+0xed>
jmp    11df <foo+0xdf>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11d0 <foo+0xd0>
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1211 <foo+0x111>
jmp    1203 <foo+0x103>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11f4 <foo+0xf4>
jmp    1216 <foo+0x116>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    119b <foo+0x9b>
movl   $0x0,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jge    12b4 <foo+0x1b4>
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    1259 <foo+0x159>
jmp    124b <foo+0x14b>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    123c <foo+0x13c>
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    127d <foo+0x17d>
jmp    126f <foo+0x16f>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1260 <foo+0x160>
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    12a1 <foo+0x1a1>
jmp    1293 <foo+0x193>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1284 <foo+0x184>
jmp    12a6 <foo+0x1a6>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    122b <foo+0x12b>
movl   $0x0,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jge    12d8 <foo+0x1d8>
jmp    12ca <foo+0x1ca>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    12bb <foo+0x1bb>
movl   $0x0,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jge    12fc <foo+0x1fc>
jmp    12ee <foo+0x1ee>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    12df <foo+0x1df>
movl   $0x0,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jge    1320 <foo+0x220>
jmp    1312 <foo+0x212>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1303 <foo+0x203>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
ret

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
br label %5
5: ; preds = %33, %0
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 64
br i1 %7, label %8, label %36
8: ; preds = %5
store i32 0, i32* %2
br label %9
9: ; preds = %13, %8
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 10
br i1 %11, label %12, label %16
12: ; preds = %9
br label %13
13: ; preds = %12
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %9
16: ; preds = %9
store i32 0, i32* %2
br label %17
17: ; preds = %21, %16
%18 = load i32, i32* %2
%19 = icmp slt i32 %18, 10
br i1 %19, label %20, label %24
20: ; preds = %17
br label %21
21: ; preds = %20
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 1
store i32 %23, i32* %2
br label %17
24: ; preds = %17
store i32 0, i32* %2
br label %25
25: ; preds = %29, %24
%26 = load i32, i32* %2
%27 = icmp slt i32 %26, 10
br i1 %27, label %28, label %32
28: ; preds = %25
br label %29
29: ; preds = %28
%30 = load i32, i32* %2
%31 = add nsw i32 %30, 1
store i32 %31, i32* %2
br label %25
32: ; preds = %25
br label %33
33: ; preds = %32
%34 = load i32, i32* %1
%35 = add nsw i32 %34, 1
store i32 %35, i32* %1
br label %5
36: ; preds = %5
store i32 0, i32* %1
br label %37
37: ; preds = %65, %36
%38 = load i32, i32* %1
%39 = icmp slt i32 %38, 64
br i1 %39, label %40, label %68
40: ; preds = %37
store i32 0, i32* %3
br label %41
41: ; preds = %45, %40
%42 = load i32, i32* %3
%43 = icmp slt i32 %42, 10
br i1 %43, label %44, label %48
44: ; preds = %41
br label %45
45: ; preds = %44
%46 = load i32, i32* %3
%47 = add nsw i32 %46, 1
store i32 %47, i32* %3
br label %41
48: ; preds = %41
store i32 0, i32* %3
br label %49
49: ; preds = %53, %48
%50 = load i32, i32* %3
%51 = icmp slt i32 %50, 10
br i1 %51, label %52, label %56
52: ; preds = %49
br label %53
53: ; preds = %52
%54 = load i32, i32* %3
%55 = add nsw i32 %54, 1
store i32 %55, i32* %3
br label %49
56: ; preds = %49
store i32 0, i32* %3
br label %57
57: ; preds = %61, %56
%58 = load i32, i32* %3
%59 = icmp slt i32 %58, 10
br i1 %59, label %60, label %64
60: ; preds = %57
br label %61
61: ; preds = %60
%62 = load i32, i32* %3
%63 = add nsw i32 %62, 1
store i32 %63, i32* %3
br label %57
64: ; preds = %57
br label %65
65: ; preds = %64
%66 = load i32, i32* %1
%67 = add nsw i32 %66, 1
store i32 %67, i32* %1
br label %37
68: ; preds = %37
store i32 0, i32* %1
br label %69
69: ; preds = %97, %68
%70 = load i32, i32* %1
%71 = icmp slt i32 %70, 64
br i1 %71, label %72, label %100
72: ; preds = %69
store i32 0, i32* %4
br label %73
73: ; preds = %77, %72
%74 = load i32, i32* %4
%75 = icmp slt i32 %74, 10
br i1 %75, label %76, label %80
76: ; preds = %73
br label %77
77: ; preds = %76
%78 = load i32, i32* %4
%79 = add nsw i32 %78, 1
store i32 %79, i32* %4
br label %73
80: ; preds = %73
store i32 0, i32* %4
br label %81
81: ; preds = %85, %80
%82 = load i32, i32* %4
%83 = icmp slt i32 %82, 10
br i1 %83, label %84, label %88
84: ; preds = %81
br label %85
85: ; preds = %84
%86 = load i32, i32* %4
%87 = add nsw i32 %86, 1
store i32 %87, i32* %4
br label %81
88: ; preds = %81
store i32 0, i32* %4
br label %89
89: ; preds = %93, %88
%90 = load i32, i32* %4
%91 = icmp slt i32 %90, 10
br i1 %91, label %92, label %96
92: ; preds = %89
br label %93
93: ; preds = %92
%94 = load i32, i32* %4
%95 = add nsw i32 %94, 1
store i32 %95, i32* %4
br label %89
96: ; preds = %89
br label %97
97: ; preds = %96
%98 = load i32, i32* %1
%99 = add nsw i32 %98, 1
store i32 %99, i32* %1
br label %69
100: ; preds = %69
store i32 0, i32* %1
br label %101
101: ; preds = %105, %100
%102 = load i32, i32* %1
%103 = icmp slt i32 %102, 64
br i1 %103, label %104, label %108
104: ; preds = %101
br label %105
105: ; preds = %104
%106 = load i32, i32* %1
%107 = add nsw i32 %106, 1
store i32 %107, i32* %1
br label %101
108: ; preds = %101
store i32 0, i32* %1
br label %109
109: ; preds = %113, %108
%110 = load i32, i32* %1
%111 = icmp slt i32 %110, 64
br i1 %111, label %112, label %116
112: ; preds = %109
br label %113
113: ; preds = %112
%114 = load i32, i32* %1
%115 = add nsw i32 %114, 1
store i32 %115, i32* %1
br label %109
116: ; preds = %109
store i32 0, i32* %1
br label %117
117: ; preds = %121, %116
%118 = load i32, i32* %1
%119 = icmp slt i32 %118, 64
br i1 %119, label %120, label %124
120: ; preds = %117
br label %121
121: ; preds = %120
%122 = load i32, i32* %1
%123 = add nsw i32 %122, 1
store i32 %123, i32* %1
br label %117
124: ; preds = %117
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}