2016-03-24 Tom de Vries <tom@codesourcery.com>
* c-c++-common/goacc/uninit-dim-clause.c: New test.
* gfortran.dg/goacc/uninit-dim-clause.f95: New test.
From-SVN: r234458
+2016-03-24 Tom de Vries <tom@codesourcery.com>
+
+ * c-c++-common/goacc/uninit-dim-clause.c: New test.
+ * gfortran.dg/goacc/uninit-dim-clause.f95: New test.
+
2016-03-24 Patrick Palka <ppalka@gcc.gnu.org>
PR c++/62212
--- /dev/null
+/* { dg-do compile } */
+/* { dg-additional-options "-Wuninitialized" } */
+
+#include <stdbool.h>
+
+int
+main (void)
+{
+ int i, j, k;
+
+ #pragma acc parallel num_gangs(i) /* { dg-warning "is used uninitialized in this function" } */
+ ;
+
+ #pragma acc parallel num_workers(j) /* { dg-warning "is used uninitialized in this function" } */
+ ;
+
+ #pragma acc parallel vector_length(k) /* { dg-warning "is used uninitialized in this function" } */
+ ;
+}
--- /dev/null
+! { dg-do compile }
+! { dg-additional-options "-Wuninitialized" }
+
+program test
+ implicit none
+ integer :: i, j, k
+
+ !$acc parallel num_gangs(i) ! { dg-warning "is used uninitialized in this function" }
+ !$acc end parallel
+
+ !$acc parallel num_workers(j) ! { dg-warning "is used uninitialized in this function" }
+ !$acc end parallel
+
+ !$acc parallel vector_length(k) ! { dg-warning "is used uninitialized in this function" }
+ !$acc end parallel
+
+end program test