diff options
Diffstat (limited to 'libgomp/testsuite/libgomp.c/sections-2.c')
-rw-r--r-- | libgomp/testsuite/libgomp.c/sections-2.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c/sections-2.c b/libgomp/testsuite/libgomp.c/sections-2.c new file mode 100644 index 00000000000..38216befe0b --- /dev/null +++ b/libgomp/testsuite/libgomp.c/sections-2.c @@ -0,0 +1,29 @@ +/* { dg-do run } */ + +#include <stdlib.h> +#include <unistd.h> + +__attribute__((noinline, noclone, noreturn)) +void +foo () +{ + sleep (4); + exit (0); +} + +int +main () +{ + #pragma omp parallel + { + #pragma omp sections + { + foo (); + #pragma omp section + foo (); + #pragma omp section + foo (); + } + } + return 0; +} |