diff options
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 5 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/pr66133.c | 35 |
2 files changed, 40 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 674c7c7..33ea5fb 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,8 @@ +2015-05-13 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/66133 + * testsuite/libgomp.c/pr66133.c: New test. + 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com> * Makefile.in: Regenerated with automake-1.11.6. diff --git a/libgomp/testsuite/libgomp.c/pr66133.c b/libgomp/testsuite/libgomp.c/pr66133.c new file mode 100644 index 0000000..e98e5aa --- /dev/null +++ b/libgomp/testsuite/libgomp.c/pr66133.c @@ -0,0 +1,35 @@ +/* PR middle-end/66133 */ +/* { dg-do run } */ +/* { dg-options "-O2 -fopenmp" } */ + +#include <stdlib.h> +#include <unistd.h> + +volatile int x; + +__attribute__((noinline)) void +foo (void) +{ + if (x == 0) + { + #pragma omp task + { + usleep (2000); + exit (0); + } + } + else + abort (); +} + +int +main () +{ + #pragma omp parallel num_threads (2) + { + #pragma omp barrier + #pragma omp single + foo (); + } + exit (0); +} |