Files
clang-p2996/polly/test/CodeGen/single_do_loop_int_param_iterations.c
Tobias Grosser 39913e3648 test: Switch to new atomic instructions
This fixes the test with recent versions of LLVM that do not support
the old atomic instructions any more.

llvm-svn: 145402
2011-11-29 14:51:05 +00:00

26 lines
284 B
C

define N 20
#include "limits.h"
int A[N];
void bar (int n) {
int i;
__sync_synchronize();
i = 0;
do {
A[0] = i;
++i;
} while (i < 2 * n);
__sync_synchronize();
}
int main () {
A[0] = 0;
bar (N/2);
if (A[0] == N - 1 )
return 0;
else
return 1;
}