2017-12-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / coarray_lib_this_image_1.f90
blob63cca3e32c7a5c762ea35e8927a09db247ccace9
1 ! { dg-do compile }
2 ! { dg-options "-fcoarray=lib -fdump-tree-original" }
5 implicit none
6 real :: x(2)[*]
7 call bar(x)
8 contains
9 subroutine bar(x)
10 integer :: mylcobound, myucobound, mylbound, mythis_image
11 real :: x(2)[5:*]
12 mylcobound = lcobound(x,dim=1)
13 myucobound = ucobound(x,dim=1)
14 mylbound = lbound(x,dim=1)
15 mythis_image = this_image()
16 end subroutine bar
17 end
19 ! { dg-final { scan-tree-dump-times "bar \\(real\\(kind=4\\)\\\[2\\\] \\* restrict x, void \\* restrict caf_token.., integer\\(kind=\[48\]\\) caf_offset..\\)" 1 "original" } }
20 ! { dg-final { scan-tree-dump-times "mylcobound = 5;" 1 "original" } }
21 ! { dg-final { scan-tree-dump-times "parm...dim\\\[1\\\].lbound = 5;" 1 "original" } }
22 ! { dg-final { scan-tree-dump-times "myucobound =\[^\n\r\]* parm...dim\\\[1\\\].lbound \\+ \[^\n\r]*_gfortran_caf_num_images \\(0, -1\\).? \\+ -?\[0-9\]+\\);" 1 "original" } }
23 ! { dg-final { scan-tree-dump-times "mylbound = 1;" 1 "original" } }
24 ! { dg-final { scan-tree-dump-times "mythis_image = _gfortran_caf_this_image \\(0\\);" 1 "original" } }
25 ! { dg-final { scan-tree-dump-times "bar \\(x, caf_token.., 0\\);" 1 "original" } }
26 ! { dg-final { scan-tree-dump-times "_gfortran_caf_init \\(&argc, &argv\\);" 1 "original" } }