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.
---
.../c-c++-common/goacc/uninit-use-device-clause.c | 14 ++++++++++++++
.../gfortran.dg/goacc/uninit-use-device-clause.f95 | 10 ++++++++++
2 files changed, 24 insertions(+)
new file mode 100644
@@ -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 *-*-* } } */
+ {
+ }
+}
new file mode 100644
@@ -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
+