diff options
author | Tom de Vries <tom@codesourcery.com> | 2016-03-24 16:15:56 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2016-03-24 16:15:56 +0000 |
commit | 9e3f4551c1d796192c4fc20e304165723c21fb03 (patch) | |
tree | f631da11a401d091f1d85f0bc6e3bc3c73e50a89 /gcc | |
parent | 45780041365e0c64e25e45cb00d16c79478558c7 (diff) | |
download | gcc-9e3f4551c1d796192c4fc20e304165723c21fb03.zip gcc-9e3f4551c1d796192c4fc20e304165723c21fb03.tar.gz gcc-9e3f4551c1d796192c4fc20e304165723c21fb03.tar.bz2 |
Add goacc/uninit-use-device-clause.{c,f95}
2016-03-24 Tom de Vries <tom@codesourcery.com>
* c-c++-common/goacc/uninit-use-device-clause.c: New test.
* gfortran.dg/goacc/uninit-use-device-clause.f95: New test.
From-SVN: r234459
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/goacc/uninit-use-device-clause.c | 14 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/goacc/uninit-use-device-clause.f95 | 10 |
3 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d268679..f0150c2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2016-03-24 Tom de Vries <tom@codesourcery.com> + * c-c++-common/goacc/uninit-use-device-clause.c: New test. + * gfortran.dg/goacc/uninit-use-device-clause.f95: New test. + +2016-03-24 Tom de Vries <tom@codesourcery.com> + * c-c++-common/goacc/uninit-dim-clause.c: New test. * gfortran.dg/goacc/uninit-dim-clause.f95: New test. diff --git a/gcc/testsuite/c-c++-common/goacc/uninit-use-device-clause.c b/gcc/testsuite/c-c++-common/goacc/uninit-use-device-clause.c new file mode 100644 index 0000000..c5d327c --- /dev/null +++ b/gcc/testsuite/c-c++-common/goacc/uninit-use-device-clause.c @@ -0,0 +1,14 @@ +/* Test fails due to PR70388. */ +/* { dg-do compile } */ +/* { dg-excess-errors "PR70388" { xfail *-*-* } } */ +/* { dg-additional-options "-Wuninitialized" } */ + +void +foo (void) +{ + int i; + +#pragma acc host_data use_device(i) /* { dg-warning "is used uninitialized in this function" "" { xfail *-*-* } } */ + { + } +} diff --git a/gcc/testsuite/gfortran.dg/goacc/uninit-use-device-clause.f95 b/gcc/testsuite/gfortran.dg/goacc/uninit-use-device-clause.f95 new file mode 100644 index 0000000..873eea7 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/goacc/uninit-use-device-clause.f95 @@ -0,0 +1,10 @@ +! { dg-do compile } +! { dg-additional-options "-Wuninitialized" } + +subroutine test + integer :: i + + !$acc host_data use_device(i) ! { dg-warning "is used uninitialized in this function" } + !$acc end host_data +end subroutine test + |