Add goacc/uninit-copy-clause.{c,f95} testcases
2016-04-08 Tom de Vries <tom@codesourcery.com> * c-c++-common/goacc/uninit-copy-clause.c: New test. * gfortran.dg/goacc/uninit-copy-clause.f95: New test. From-SVN: r234824
This commit is contained in:
parent
02cf2861fc
commit
211f3d57b1
3 changed files with 72 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2016-04-08 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
* c-c++-common/goacc/uninit-copy-clause.c: New test.
|
||||
* gfortran.dg/goacc/uninit-copy-clause.f95: New test.
|
||||
|
||||
2016-04-08 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* gcc.target/powerpc/pr70117.c: New.
|
||||
|
|
38
gcc/testsuite/c-c++-common/goacc/uninit-copy-clause.c
Normal file
38
gcc/testsuite/c-c++-common/goacc/uninit-copy-clause.c
Normal file
|
@ -0,0 +1,38 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-additional-options "-Wuninitialized" } */
|
||||
|
||||
void
|
||||
foo (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
#pragma acc kernels
|
||||
{
|
||||
i = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
foo2 (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
#pragma acc kernels copy (i)
|
||||
{
|
||||
i = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
foo3 (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
#pragma acc kernels copyin(i)
|
||||
{
|
||||
i = 1;
|
||||
}
|
||||
|
||||
}
|
29
gcc/testsuite/gfortran.dg/goacc/uninit-copy-clause.f95
Normal file
29
gcc/testsuite/gfortran.dg/goacc/uninit-copy-clause.f95
Normal file
|
@ -0,0 +1,29 @@
|
|||
! { dg-do compile }
|
||||
! { dg-additional-options "-Wuninitialized" }
|
||||
|
||||
subroutine foo
|
||||
integer :: i
|
||||
|
||||
!$acc kernels
|
||||
i = 1
|
||||
!$acc end kernels
|
||||
|
||||
end subroutine foo
|
||||
|
||||
subroutine foo2
|
||||
integer :: i
|
||||
|
||||
!$acc kernels copy (i)
|
||||
i = 1
|
||||
!$acc end kernels
|
||||
|
||||
end subroutine foo2
|
||||
|
||||
subroutine foo3
|
||||
integer :: i
|
||||
|
||||
!$acc kernels copyin (i)
|
||||
i = 1
|
||||
!$acc end kernels
|
||||
|
||||
end subroutine foo3
|
Loading…
Add table
Reference in a new issue