Move dg-error tests from goacc/nesting-1.c to goacc/nesting-fail-1.c
2015-10-28 Tom de Vries <tom@codesourcery.com>
* c-c++-common/goacc/nesting-1.c (f_acc_data): Move dg-error tests to ...
* c-c++-common/goacc/nesting-fail-1.c (f_acc_data): ... here.
---
gcc/testsuite/c-c++-common/goacc/nesting-1.c | 8 --------
gcc/testsuite/c-c++-common/goacc/nesting-fail-1.c | 19 +++++++++++++++++++
2 files changed, 19 insertions(+), 8 deletions(-)
@@ -58,10 +58,6 @@ f_acc_data (void)
#pragma acc exit data delete(i)
-#pragma acc loop /* { dg-error "loop directive must be associated with an OpenACC compute region" } */
- for (i = 0; i < 2; ++i)
- ;
-
#pragma acc data
{
#pragma acc parallel
@@ -92,10 +88,6 @@ f_acc_data (void)
#pragma acc enter data copyin(i)
#pragma acc exit data delete(i)
-
-#pragma acc loop /* { dg-error "loop directive must be associated with an OpenACC compute region" } */
- for (i = 0; i < 2; ++i)
- ;
}
}
}
@@ -45,3 +45,22 @@ f_acc_routine (void)
#pragma acc parallel /* { dg-error "OpenACC region inside of OpenACC routine, nested parallelism not supported yet" } */
;
}
+
+void
+f_acc_data (void)
+{
+ unsigned int i;
+#pragma acc data
+ {
+#pragma acc loop /* { dg-error "loop directive must be associated with an OpenACC compute region" } */
+ for (i = 0; i < 2; ++i)
+ ;
+
+#pragma acc data
+ {
+#pragma acc loop /* { dg-error "loop directive must be associated with an OpenACC compute region" } */
+ for (i = 0; i < 2; ++i)
+ ;
+ }
+ }
+}
--
1.9.1