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:
Tom de Vries 2016-04-08 08:48:12 +00:00 committed by Tom de Vries
parent 02cf2861fc
commit 211f3d57b1
3 changed files with 72 additions and 0 deletions

View file

@ -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.

View 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;
}
}

View 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