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
+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.
--- /dev/null
+/* { 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;
+ }
+
+}
--- /dev/null
+! { 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