]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-4.c
[nvptx] Commit passing pr85381-*.c test-cases
[thirdparty/gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / pr85381-4.c
CommitLineData
384c0d5e 1/* { dg-additional-options "-save-temps -w" } */
2/* { dg-do run { target openacc_nvidia_accel_selected } }
3 { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
4
5#define n 1024
6
7int
8main (void)
9{
10 #pragma acc parallel
11 {
12 #pragma acc loop worker
13 for (int i = 0; i < n; i++)
14 ;
15
16 #pragma acc loop worker
17 for (int i = 0; i < n; i++)
18 ;
19 }
20
21 return 0;
22}
23
24/* Atm, %ntid.y is broadcast from one loop to the next, so there are 2 bar.syncs
25 for that (the other two are there for the same reason as in pr85381-2.c).
26 Todo: Recompute %ntid.y instead of broadcasting it. */
27/* { dg-final { scan-assembler-times "bar.sync" 4 } } */