Set num_threads to 50 on 32-bit hppa in two libgomp loop tests
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / reduction-8.c
blobd25060572b56bf159c50477bba8793e7e50380f7
1 const int n = 100;
3 // Check async over parallel construct with reduction
5 int
6 async_sum (int c)
8 int s = 0;
10 #pragma acc parallel loop num_gangs (10) gang reduction (+:s) async
11 for (int i = 0; i < n; i++)
12 s += i+c;
14 #pragma acc wait
15 return s;
18 int
19 main()
21 int result = 0;
23 for (int i = 0; i < n; i++)
24 result += i+1;
26 if (async_sum (1) != result)
27 __builtin_abort ();
29 return 0;