hppa64: Fix fmt_f_default_field_width_3.f90 and fmt_g_default_field_width_3.f90
[official-gcc.git] / gcc / testsuite / gfortran.dg / coarray_lib_comm_1.f90
bloba8954e7afa32c7c981c8d1e984d0fe349d2b0584
1 ! { dg-do run }
2 ! { dg-options "-fdump-tree-original -fcoarray=lib -lcaf_single" }
3 ! { dg-additional-options "-latomic" { target libatomic_available } }
5 ! Some dependency-analysis check for coarray communication
7 integer, target, save :: A(10)[*]
8 integer, pointer :: P(:)
9 integer, save :: B(10)[*]
11 A = [1,2,3,4,5,6,7,8,9,10]
12 B = [1,2,3,4,5,6,7,8,9,10]
13 A(10:2:-1) = A(9:1:-1)[1] ! 0
14 B(10:2:-1) = B(9:1:-1)
15 if (any (A-B /= 0)) STOP 1
17 A = [1,2,3,4,5,6,7,8,9,10]
18 B = [1,2,3,4,5,6,7,8,9,10]
19 A(9:1:-1) = A(10:2:-1)[1] ! 1
20 B(9:1:-1) = B(10:2:-1)
21 if (any (A-B /= 0)) STOP 2
23 A = [1,2,3,4,5,6,7,8,9,10]
24 B = [1,2,3,4,5,6,7,8,9,10]
25 allocate(P(10))
26 P(:) = A(:)[1] ! 1
27 if (any (A-B /= 0)) STOP 3
29 A = [1,2,3,4,5,6,7,8,9,10]
30 B = [1,2,3,4,5,6,7,8,9,10]
31 allocate(P(10))
32 P(:) = B(:)[1] ! 0
34 A = [1,2,3,4,5,6,7,8,9,10]
35 B = [1,2,3,4,5,6,7,8,9,10]
36 A(1:5)[1] = A(3:7)[1] ! 1
37 B(1:5) = B(3:7)
38 if (any (A-B /= 0)) STOP 4
39 end
41 ! { dg-final { scan-tree-dump-times "_gfortran_caf_get \\\(caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, &parm.\[0-9\]+, 4, 4, 1, 0B\\\);" 3 "original" } }
42 ! { dg-final { scan-tree-dump-times "_gfortran_caf_get \\\(caf_token.1, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) b, 1, &parm.\[0-9\]+, 0B, &parm.\[0-9\]+, 4, 4, 0, 0B\\\);" 1 "original" } }
43 ! { dg-final { scan-tree-dump-times "_gfortran_caf_sendget \\\(caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, 4, 4, 1, 0B\\\);" 1 "original" } }