int main() {
  __float128 f = 0.0;
  int i;
#pragma omp parallel for reduction(+ : f)
  for (i = 0; i < 128; i++)
    f += 0.5Q;
  if (f != 64.0Q)
    abort();
#pragma omp atomic
  f += 8.5Q;
  if (f != 72.5Q)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
xor    %eax,%eax
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movaps %xmm0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x80,-0x24(%rbp)
jge    115e <main+0x4e>
movaps -0x20(%rbp),%xmm0
movaps 0x1ee9(%rip),%xmm1
call   11c0 <__addtf3>
movaps %xmm0,-0x20(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    112f <main+0x1f>
movaps -0x20(%rbp),%xmm0
movaps 0x1e97(%rip),%xmm1
call   25a0 <__eqtf2>
test   %eax,%eax
je     1180 <main+0x70>
jmp    117b <main+0x6b>
call   1030 <abort@plt>
movaps -0x20(%rbp),%xmm0
movaps 0x1e85(%rip),%xmm1
call   11c0 <__addtf3>
movaps %xmm0,-0x20(%rbp)
movaps -0x20(%rbp),%xmm0
movaps 0x1e81(%rip),%xmm1
call   25a0 <__eqtf2>
test   %eax,%eax
je     11b6 <main+0xa6>
jmp    11b1 <main+0xa1>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret
xchg   %ax,%ax

x86 assembly (clang, -O2):
<main>:
push   %rbx
xorps  %xmm0,%xmm0
mov    $0x80,%ebx
nopl   0x0(%rax)
movaps 0x1ed9(%rip),%xmm1
call   11a0 <__addtf3>
movaps 0x1ecd(%rip),%xmm1
call   11a0 <__addtf3>
movaps 0x1ec1(%rip),%xmm1
call   11a0 <__addtf3>
movaps 0x1eb5(%rip),%xmm1
call   11a0 <__addtf3>
movaps 0x1ea9(%rip),%xmm1
call   11a0 <__addtf3>
movaps 0x1e9d(%rip),%xmm1
call   11a0 <__addtf3>
movaps 0x1e91(%rip),%xmm1
call   11a0 <__addtf3>
movaps 0x1e85(%rip),%xmm1
call   11a0 <__addtf3>
add    $0xfffffff8,%ebx
jne    1120 <main+0x10>
movaps 0x1e84(%rip),%xmm1
call   2580 <__eqtf2>
test   %eax,%eax
jne    1199 <main+0x89>
xor    %eax,%eax
pop    %rbx
ret
call   1030 <abort@plt>
xchg   %ax,%ax

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca fp128
%3 = alloca i32
store i32 0, i32* %1
store fp128 0xL00000000000000000000000000000000, fp128* %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 128
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load fp128, fp128* %2
%9 = fadd fp128 %8, 0xL00000000000000003FFE000000000000
store fp128 %9, fp128* %2
br label %10
10: ; preds = %7
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
%14 = load fp128, fp128* %2
%15 = fcmp une fp128 %14, 0xL00000000000000004005000000000000
br i1 %15, label %16, label %17
16: ; preds = %13
unreachable
17: ; preds = %13
%18 = load fp128, fp128* %2
%19 = fadd fp128 %18, 0xL00000000000000004002100000000000
store fp128 %19, fp128* %2
%20 = load fp128, fp128* %2
%21 = fcmp une fp128 %20, 0xL00000000000000004005220000000000
br i1 %21, label %22, label %23
22: ; preds = %17
unreachable
23: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %12, %1 ]
%3 = phi fp128 [ 0xL00000000000000000000000000000000, %0 ], [ %11, %1 ]
%4 = fadd fp128 %3, 0xL00000000000000003FFE000000000000
%5 = fadd fp128 %4, 0xL00000000000000003FFE000000000000
%6 = fadd fp128 %5, 0xL00000000000000003FFE000000000000
%7 = fadd fp128 %6, 0xL00000000000000003FFE000000000000
%8 = fadd fp128 %7, 0xL00000000000000003FFE000000000000
%9 = fadd fp128 %8, 0xL00000000000000003FFE000000000000
%10 = fadd fp128 %9, 0xL00000000000000003FFE000000000000
%11 = fadd fp128 %10, 0xL00000000000000003FFE000000000000
%12 = add nuw nsw i32 %2, 8
%13 = icmp eq i32 %12, 128
br i1 %13, label %14, label %1
14: ; preds = %1
%15 = fcmp une fp128 %11, 0xL00000000000000004005000000000000
br i1 %15, label %16, label %17
16: ; preds = %14
tail call void @abort()
unreachable
17: ; preds = %14
ret i32 0
}