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
This commit is contained in:
Tom de Vries 2016-03-24 16:15:56 +00:00 committed by Tom de Vries
parent 4578004136
commit 9e3f4551c1
3 changed files with 29 additions and 0 deletions

View File

@ -1,3 +1,8 @@
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.

View File

@ -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 *-*-* } } */
{
}
}

View File

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