]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/c-c++-common/cilk-plus/CK/pr60586.c
[Patch AArch64] Fixup floating point division with -march=armv8-a+nosimd
[thirdparty/gcc.git] / gcc / testsuite / c-c++-common / cilk-plus / CK / pr60586.c
1 /* { dg-do run } */
2 /* { dg-require-effective-target cilkplus_runtime } */
3 /* { dg-options "-fcilkplus -O2" } */
4
5 int noop(int x)
6 {
7 return x;
8 }
9
10 int post_increment(int *x)
11 {
12 return (*x)++;
13 }
14
15 int main(int argc, char *argv[])
16 {
17 int m = 5;
18 int n = m;
19 int r = _Cilk_spawn noop(post_increment(&n));
20 int n2 = n;
21 _Cilk_sync;
22
23 if (r != m || n2 != m + 1)
24 return 1;
25 else
26 return 0;
27 }
28