diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/gomp/appendix-a/a.21.3.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/gomp/appendix-a/a.21.3.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gomp/appendix-a/a.21.3.c b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.21.3.c new file mode 100644 index 00000000000..4d1ed6a5286 --- /dev/null +++ b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.21.3.c @@ -0,0 +1,23 @@ +/* { dg-do compile } */ + +void work (int); + +void +a21_good (int n) +{ + int i; +#pragma omp for ordered + for (i = 0; i < n; i++) + { + if (i <= 10) + { +#pragma omp ordered + work (i); + } + if (i > 10) + { +#pragma omp ordered + work (i + 1); + } + } +} |