summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.fortran/associate3.f90
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp/testsuite/libgomp.fortran/associate3.f90')
-rw-r--r--libgomp/testsuite/libgomp.fortran/associate3.f9020
1 files changed, 20 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.fortran/associate3.f90 b/libgomp/testsuite/libgomp.fortran/associate3.f90
new file mode 100644
index 0000000000..ec3d8dc33b
--- /dev/null
+++ b/libgomp/testsuite/libgomp.fortran/associate3.f90
@@ -0,0 +1,20 @@
+! PR fortran/71717
+! { dg-do run }
+
+ type t
+ real, allocatable :: f(:)
+ end type
+ type (t) :: v
+ integer :: i, j
+ allocate (v%f(4))
+ v%f = 19.
+ i = 5
+ associate (u => v, k => i)
+ !$omp parallel do
+ do j = 1, 4
+ u%f(j) = 21.
+ if (j.eq.1) k = 7
+ end do
+ end associate
+ if (any (v%f(:).ne.21.) .or. i.ne.7) call abort
+end