summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/coarray_sync_memory.f90
blob: c4e660b8cf727dc7aae4c40c970cdcc595478129 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! { dg-do compile }
! { dg-options "-fdump-tree-original -fcoarray=lib" }
!
! Coarray sync memory managed by the external library
!
implicit none
integer :: stat
character(len=42) :: msg
sync memory
sync memory(stat=stat)
sync memory(errmsg=msg)
sync memory(errmsg=msg, stat=stat)
end

! { dg-final { scan-tree-dump-times "_gfortran_caf_sync_memory \\(0B, 0B, 0\\);" 1 "original" } }
! { dg-final { scan-tree-dump-times "_gfortran_caf_sync_memory \\(&stat, 0B, 0\\);" 1 "original" } }
! { dg-final { scan-tree-dump-times "_gfortran_caf_sync_memory \\(0B, &&msg, 42\\);" 1 "original" } }
! { dg-final { scan-tree-dump-times "_gfortran_caf_sync_memory \\(&stat, &&msg, 42\\);" 1 "original" } }