aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/goacc/critical.f95
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/goacc/critical.f95')
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/critical.f9527
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/goacc/critical.f95 b/gcc/testsuite/gfortran.dg/goacc/critical.f95
new file mode 100644
index 0000000..510ea18
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/goacc/critical.f95
@@ -0,0 +1,27 @@
+! { dg-do compile }
+! { dg-additional-options "-fcoarray=single" }
+
+module test
+contains
+ subroutine oacc1
+ implicit none
+ integer :: i, j
+ j = 0
+ !$acc parallel
+ critical ! { dg-error "CRITICAL block inside of" }
+ j = j + 1
+ end critical
+ !$acc end parallel
+ end subroutine oacc1
+
+ subroutine oacc2
+ implicit none
+ integer :: i, j
+ j = 0
+ critical
+ !$acc parallel ! { dg-error "OpenACC directive inside of" }
+ j = j + 1
+ !$acc end parallel
+ end critical
+ end subroutine oacc2
+end module test \ No newline at end of file