void f2(void) {
  int i, j = 0;
#pragma omp parallel
  {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
#pragma omp master
    {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
    }
#pragma omp single
    {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
    }
#pragma omp critical
    {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
    }
#pragma omp taskgroup
    {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
    }
#pragma omp task
    {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
    }
#pragma omp taskgroup
#pragma omp task
    {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
    }
#pragma omp taskgroup
    {
#pragma omp task
        {
#pragma omp task
            {
#pragma omp cancellation point taskgroup
#pragma omp cancel taskgroup
            }}}
#pragma omp taskgroup
    {
#pragma omp parallel
      {
#pragma omp task
          {
#pragma omp cancel taskgroup
#pragma omp cancellation point taskgroup
          }}
#pragma omp target
      {
#pragma omp task
        {
#pragma omp cancel taskgroup
#pragma omp cancellation point taskgroup
        }
      }
#pragma omp target
#pragma omp teams
#pragma omp distribute
      for (i = 0; i < 10; i++) {
#pragma omp task
        {
#pragma omp cancel taskgroup
#pragma omp cancellation point taskgroup
        }
      }
#pragma omp target data map(i)
      {
#pragma omp task
        {
#pragma omp cancel taskgroup
#pragma omp cancellation point taskgroup
        }
      }
    }
#pragma omp for
    for (i = 0; i < 10; i++) {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
    }
#pragma omp for ordered
    for (i = 0; i < 10; i++)
#pragma omp ordered
    {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
    }
#pragma omp sections
    {{
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
    }
#pragma omp section
     {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
     }}
#pragma omp target data map(j)
    {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
    }
#pragma omp target
    {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
    }
  }
#pragma omp target data map(j)
  {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
  }
#pragma omp target
  {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
  }
#pragma omp target teams
  {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
  }
#pragma omp target teams distribute
  for (i = 0; i < 10; i++) {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
  }
#pragma omp for
  for (i = 0; i < 10; i++) {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
  }
#pragma omp for
  for (i = 0; i < 10; i++)
#pragma omp target data map(j)
  {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
  }
#pragma omp for
  for (i = 0; i < 10; i++)
#pragma omp target
  {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
  }
#pragma omp for ordered
  for (i = 0; i < 10; i++)
#pragma omp ordered
#pragma omp target data map(j)
  {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
  }
#pragma omp for ordered
  for (i = 0; i < 10; i++)
#pragma omp ordered
#pragma omp target
  {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
  }
#pragma omp sections
  {{
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
  }
#pragma omp section
   {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
   }}
#pragma omp sections
  {
#pragma omp target data map(j)
      {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
      }
#pragma omp section
#pragma omp target data map(j)
      {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
      }}
#pragma omp sections
  {
#pragma omp target
      {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
      }
#pragma omp section
#pragma omp target
      {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
      }}
#pragma omp task
  {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
#pragma omp taskgroup
    {
#pragma omp cancel parallel
#pragma omp cancel for
#pragma omp cancel sections
#pragma omp cancel taskgroup
#pragma omp cancellation point parallel
#pragma omp cancellation point for
#pragma omp cancellation point sections
#pragma omp cancellation point taskgroup
    }
  }
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    112f <f2+0x2f>
jmp    1121 <f2+0x21>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <f2+0x12>
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1153 <f2+0x53>
jmp    1145 <f2+0x45>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1136 <f2+0x36>
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1177 <f2+0x77>
jmp    1169 <f2+0x69>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    115a <f2+0x5a>
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    119b <f2+0x9b>
jmp    118d <f2+0x8d>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    117e <f2+0x7e>
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    11bf <f2+0xbf>
jmp    11b1 <f2+0xb1>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11a2 <f2+0xa2>
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    11e3 <f2+0xe3>
jmp    11d5 <f2+0xd5>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11c6 <f2+0xc6>
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1207 <f2+0x107>
jmp    11f9 <f2+0xf9>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11ea <f2+0xea>
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    122b <f2+0x12b>
jmp    121d <f2+0x11d>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    120e <f2+0x10e>
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    124f <f2+0x14f>
jmp    1241 <f2+0x141>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1232 <f2+0x132>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f2() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %10
6: ; preds = %3
br label %7
7: ; preds = %6
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %3
10: ; preds = %3
store i32 0, i32* %1
br label %11
11: ; preds = %15, %10
%12 = load i32, i32* %1
%13 = icmp slt i32 %12, 10
br i1 %13, label %14, label %18
14: ; preds = %11
br label %15
15: ; preds = %14
%16 = load i32, i32* %1
%17 = add nsw i32 %16, 1
store i32 %17, i32* %1
br label %11
18: ; preds = %11
store i32 0, i32* %1
br label %19
19: ; preds = %23, %18
%20 = load i32, i32* %1
%21 = icmp slt i32 %20, 10
br i1 %21, label %22, label %26
22: ; preds = %19
br label %23
23: ; preds = %22
%24 = load i32, i32* %1
%25 = add nsw i32 %24, 1
store i32 %25, i32* %1
br label %19
26: ; preds = %19
store i32 0, i32* %1
br label %27
27: ; preds = %31, %26
%28 = load i32, i32* %1
%29 = icmp slt i32 %28, 10
br i1 %29, label %30, label %34
30: ; preds = %27
br label %31
31: ; preds = %30
%32 = load i32, i32* %1
%33 = add nsw i32 %32, 1
store i32 %33, i32* %1
br label %27
34: ; preds = %27
store i32 0, i32* %1
br label %35
35: ; preds = %39, %34
%36 = load i32, i32* %1
%37 = icmp slt i32 %36, 10
br i1 %37, label %38, label %42
38: ; preds = %35
br label %39
39: ; preds = %38
%40 = load i32, i32* %1
%41 = add nsw i32 %40, 1
store i32 %41, i32* %1
br label %35
42: ; preds = %35
store i32 0, i32* %1
br label %43
43: ; preds = %47, %42
%44 = load i32, i32* %1
%45 = icmp slt i32 %44, 10
br i1 %45, label %46, label %50
46: ; preds = %43
br label %47
47: ; preds = %46
%48 = load i32, i32* %1
%49 = add nsw i32 %48, 1
store i32 %49, i32* %1
br label %43
50: ; preds = %43
store i32 0, i32* %1
br label %51
51: ; preds = %55, %50
%52 = load i32, i32* %1
%53 = icmp slt i32 %52, 10
br i1 %53, label %54, label %58
54: ; preds = %51
br label %55
55: ; preds = %54
%56 = load i32, i32* %1
%57 = add nsw i32 %56, 1
store i32 %57, i32* %1
br label %51
58: ; preds = %51
store i32 0, i32* %1
br label %59
59: ; preds = %63, %58
%60 = load i32, i32* %1
%61 = icmp slt i32 %60, 10
br i1 %61, label %62, label %66
62: ; preds = %59
br label %63
63: ; preds = %62
%64 = load i32, i32* %1
%65 = add nsw i32 %64, 1
store i32 %65, i32* %1
br label %59
66: ; preds = %59
store i32 0, i32* %1
br label %67
67: ; preds = %71, %66
%68 = load i32, i32* %1
%69 = icmp slt i32 %68, 10
br i1 %69, label %70, label %74
70: ; preds = %67
br label %71
71: ; preds = %70
%72 = load i32, i32* %1
%73 = add nsw i32 %72, 1
store i32 %73, i32* %1
br label %67
74: ; preds = %67
ret void
}

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