Merge aosp-toolchain/gcc/gcc-4_9 changes.
[official-gcc.git] / gcc-4_9 / gcc / testsuite / gfortran.dg / coarray_2.f90
blob902a0dd98206259613f072cc45172991fd435f56
1 ! { dg-do run }
2 ! { dg-options "-fcoarray=single" }
3 ! { dg-shouldfail "error stop" }
4 !
5 ! Coarray support
6 ! PR fortran/18918
8 implicit none
9 integer :: n
10 character(len=30) :: str
11 critical
12 end critical
13 myCr: critical
14 end critical myCr
15 sync all
16 sync all ( )
17 n = 5
18 sync all (stat=n)
19 if (n /= 0) call abort()
20 n = 5
21 sync all (stat=n,errmsg=str)
22 if (n /= 0) call abort()
23 sync all (errmsg=str)
25 sync memory
26 sync memory ( )
27 n = 5
28 sync memory (stat=n)
29 if (n /= 0) call abort()
30 n = 5
31 sync memory (errmsg=str,stat=n)
32 if (n /= 0) call abort()
33 sync memory (errmsg=str)
35 sync images (*, stat=n)
36 sync images (1, errmsg=str)
37 sync images ([1],errmsg=str,stat=n)
39 sync images (*)
40 sync images (1)
41 sync images ([1])
43 if (num_images() /= 1) call abort()
44 error stop 'stop'
45 end
47 ! { dg-output "ERROR STOP stop" }