summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/coarray_collectives_15.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/coarray_collectives_15.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_collectives_15.f9020
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/coarray_collectives_15.f90 b/gcc/testsuite/gfortran.dg/coarray_collectives_15.f90
new file mode 100644
index 00000000000..1e14dbbc037
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_collectives_15.f90
@@ -0,0 +1,20 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original -fcoarray=single" }
+!
+! CO_REDUCE
+!
+program test
+ implicit none
+ intrinsic co_reduce
+ integer :: stat1
+ real :: val
+ call co_reduce(val, valid, result_image=1, stat=stat1)
+contains
+ pure real function valid(x,y)
+ real, value :: x, y
+ valid = x * y
+ end function valid
+end program test
+
+! { dg-final { scan-tree-dump-times "stat1 = 0;" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }