gcc/testsuite/
* c-c++-common/gomp/nesting-1.c: New file.
* c-c++-common/gomp/nesting-warn-1.c: Likewise.
From-SVN: r218687
+2014-12-12 Thomas Schwinge <thomas@codesourcery.com>
+
+ * c-c++-common/gomp/nesting-1.c: New file.
+ * c-c++-common/gomp/nesting-warn-1.c: Likewise.
+
2014-12-12 Kai Tietz <ktietz@redhat.com>
PR c++/63996
--- /dev/null
+extern int i;
+
+void
+f_omp_parallel (void)
+{
+#pragma omp parallel
+ {
+#pragma omp parallel
+ ;
+
+#pragma omp target
+ ;
+
+#pragma omp target data
+ ;
+
+#pragma omp target update to(i)
+
+#pragma omp target data
+ {
+#pragma omp parallel
+ ;
+
+#pragma omp target
+ ;
+
+#pragma omp target data
+ ;
+
+#pragma omp target update to(i)
+ }
+ }
+}
+
+void
+f_omp_target (void)
+{
+#pragma omp target
+ {
+#pragma omp parallel
+ ;
+ }
+}
+
+void
+f_omp_target_data (void)
+{
+#pragma omp target data
+ {
+#pragma omp parallel
+ ;
+
+#pragma omp target
+ ;
+
+#pragma omp target data
+ ;
+
+#pragma omp target update to(i)
+
+#pragma omp target data
+ {
+#pragma omp parallel
+ ;
+
+#pragma omp target
+ ;
+
+#pragma omp target data
+ ;
+
+#pragma omp target update to(i)
+ }
+ }
+}
--- /dev/null
+extern int i;
+
+void
+f_omp_target (void)
+{
+#pragma omp target
+ {
+#pragma omp target /* { dg-warning "target construct inside of target region" } */
+ ;
+#pragma omp target data /* { dg-warning "target data construct inside of target region" } */
+ ;
+#pragma omp target update to(i) /* { dg-warning "target update construct inside of target region" } */
+
+#pragma omp parallel
+ {
+#pragma omp target /* { dg-warning "target construct inside of target region" } */
+ ;
+#pragma omp target data /* { dg-warning "target data construct inside of target region" } */
+ ;
+#pragma omp target update to(i) /* { dg-warning "target update construct inside of target region" } */
+ }
+ }
+}