diff options
author | vries <vries@138bc75d-0d04-0410-961f-82ee72b054a4> | 2019-01-11 11:45:55 +0000 |
---|---|---|
committer | vries <vries@138bc75d-0d04-0410-961f-82ee72b054a4> | 2019-01-11 11:45:55 +0000 |
commit | 33db3d27337ad483289d1c86b726f816af5aea9a (patch) | |
tree | c06bbee79dfe1766d18559bcbc6bf0174ff88939 /libgomp | |
parent | a18b3766a81c582dd2aff58376b0b15dc4e06072 (diff) |
[nvptx, testsuite, openacc, libgomp] Add insufficient-resources.c
Add a test-case that tests the "insufficient resources" fatal in the nvptx
libgomp plugin.
2019-01-11 Tom de Vries <tdevries@suse.de>
* testsuite/libgomp.oacc-c-c++-common/insufficient-resources.c: New
test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267835 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 5 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.oacc-c-c++-common/insufficient-resources.c | 21 |
2 files changed, 26 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 100bbdc7748..47af47f81e1 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,8 @@ +2019-01-11 Tom de Vries <tdevries@suse.de> + + * testsuite/libgomp.oacc-c-c++-common/insufficient-resources.c: New + test. + 2019-01-10 Nathan Sidwell <nathan@acm.org> Julian Brown <julian@codesourcery.com> diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/insufficient-resources.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/insufficient-resources.c new file mode 100644 index 00000000000..b59cd420785 --- /dev/null +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/insufficient-resources.c @@ -0,0 +1,21 @@ +/* { dg-set-target-env-var "GOMP_OPENACC_DIM" ":33:" } */ +/* { dg-shouldfail "" { openacc_nvidia_accel_selected } } */ + +#include <stdlib.h> +#include <stdio.h> + +int +main (void) +{ +#pragma acc parallel vector_length (32) + { +#pragma acc loop worker + for (unsigned int i = 0; i < 32; i++) +#pragma acc loop vector + for (unsigned int j = 0; j < 64; j++) + ; + } + + return 0; +} +/* { dg-output "The Nvidia accelerator has insufficient resources" { target openacc_nvidia_accel_selected } } */ |