Debian Codegraph @

gcc/testsuite/gfortran.dg/coarray/associate_1.f90

raw
1 !{ dg-do run }
2
3 ! Contributed by Neil Carlson <[email protected]>
4 ! Check PR110033 is fixed.
5
6 program coarray_associate_1
7 type t
8 integer :: b = -1
9 logical :: l = .FALSE.
10 end type
11
12 integer :: x[*] = 10
13 class(t), allocatable :: c[:]
14
15 associate (y => x)
16 y = -1
17 y[1] = 35
18 end associate
19 allocate(c[*])
20 associate (f => c)
21 f%b = 17
22 f[1]%l = .TRUE.
23 end associate
24
25 if (this_image() == 1) then
26 if (x /= 35) stop 1
27 if (c%b /= 17) stop 2
28 if (.NOT. c%l) stop 3
29 else
30 if (x /= -1) stop 4
31 if (c%b /= 17) stop 5
32 if (c%l) stop 6
33 end if
34
35 end
36