diff options
author | Martin Liska <mliska@suse.cz> | 2022-10-13 15:54:17 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-10-13 15:54:17 +0200 |
commit | bd21c04269deded2c7476ceca1100a26f28ea526 (patch) | |
tree | 197bf75eedac69362078a4ccc0afe5615c45c327 /libgomp/testsuite/libgomp.c | |
parent | d9e7934d25da4a78ffef1f738206aa1d897911df (diff) | |
parent | 786e4c024f941671a233f5779d73a5d22f4e9588 (diff) | |
download | gcc-bd21c04269deded2c7476ceca1100a26f28ea526.zip gcc-bd21c04269deded2c7476ceca1100a26f28ea526.tar.gz gcc-bd21c04269deded2c7476ceca1100a26f28ea526.tar.bz2 |
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'libgomp/testsuite/libgomp.c')
-rw-r--r-- | libgomp/testsuite/libgomp.c/task-7.c | 26 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/task-8.c | 14 |
2 files changed, 40 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c/task-7.c b/libgomp/testsuite/libgomp.c/task-7.c new file mode 100644 index 0000000..0307575 --- /dev/null +++ b/libgomp/testsuite/libgomp.c/task-7.c @@ -0,0 +1,26 @@ +/* { dg-do run } */ + +#include <omp.h> +#include <stdlib.h> + +int +main () +{ + #pragma omp task final (1) + { + if (!omp_in_final ()) + abort (); + #pragma omp task + { + if (!omp_in_final ()) + abort (); + #pragma omp target nowait + if (omp_in_final ()) + abort (); + if (!omp_in_final ()) + abort (); + #pragma omp taskwait + } + } + return 0; +} diff --git a/libgomp/testsuite/libgomp.c/task-8.c b/libgomp/testsuite/libgomp.c/task-8.c new file mode 100644 index 0000000..f03aef6 --- /dev/null +++ b/libgomp/testsuite/libgomp.c/task-8.c @@ -0,0 +1,14 @@ +/* { dg-do run } */ + +int +main () +{ + int i = 0; + #pragma omp task + { + #pragma omp target nowait private (i) + i = 1; + #pragma omp taskwait + } + return 0; +} |