@@ -24,41 +24,41 @@ function f(x) result(y)
24
24
type, extends(parent) :: child
25
25
26
26
! Scalar and array derived-type components
27
- type (component) a, b(1 ,2 ,1 , 1 ,1 ,1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 )
27
+ type (component) a, b(1 ,2 ,1 , 1 ,1 ,1 , 1 )
28
28
29
29
! Scalar and array intrinsic-type components
30
30
character (len= len (text)) :: c= " " , z(0 )
31
31
complex :: i= (0 .,0 .), j(1 )= (0 .,0 .)
32
32
integer :: k= 0 , l(2 ,3 )= 0
33
- logical :: r= .false. , s(1 ,2 ,3 , 1 ,2 ,3 , 1 , 2 , 3 , 1 , 2 , 3 , 1 , 2 , 3 )= .false.
33
+ logical :: r= .false. , s(1 ,2 ,3 , 1 ,2 ,3 , 1 )= .false.
34
34
real :: t= 0 ., u(3 ,2 ,1 )= 0 .
35
35
36
36
! Scalar and array pointer components
37
37
character (len= len (text)), pointer :: &
38
- char_ptr= >null (), char_ptr_maxdim(:,:,:, :,:,:, :,:,:, :,:,:, :,:,: )= >null ()
39
- complex , pointer :: cplx_ptr= >null (), cplx_ptr_maxdim(:,:,:, :,:,:, :,:,:, :,:,:, :,:,: )= >null ()
40
- integer , pointer :: int_ptr = >null (), int_ptr_maxdim (:,:,:, :,:,:, :,:,:, :,:,:, :,:,: )= >null ()
41
- logical , pointer :: bool_ptr= >null (), bool_ptr_maxdim(:,:,:, :,:,:, :,:,:, :,:,:, :,:,: )= >null ()
42
- real , pointer :: real_ptr= >null (), real_ptr_maxdim(:,:,:, :,:,:, :,:,:, :,:,:, :,:,: )= >null ()
38
+ char_ptr= >null (), char_ptr_maxdim(:,:,:, :,:,:, :)= >null ()
39
+ complex , pointer :: cplx_ptr= >null (), cplx_ptr_maxdim(:,:,:, :,:,:, :)= >null ()
40
+ integer , pointer :: int_ptr = >null (), int_ptr_maxdim (:,:,:, :,:,:, :)= >null ()
41
+ logical , pointer :: bool_ptr= >null (), bool_ptr_maxdim(:,:,:, :,:,:, :)= >null ()
42
+ real , pointer :: real_ptr= >null (), real_ptr_maxdim(:,:,:, :,:,:, :)= >null ()
43
43
procedure (f), pointer :: procedure_pointer= >null ()
44
44
end type
45
45
46
46
type (child) message
47
47
type (child) :: content = child( & ! define content using the insrinsic structure constructor
48
48
parent= parent(heritable=- 4 ), & ! parent
49
- a= component(- 3 ), b= reshape ([component(- 2 ),component(- 1 )], [1 ,2 ,1 , 1 ,1 ,1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ]), & ! derived types
49
+ a= component(- 3 ), b= reshape ([component(- 2 ),component(- 1 )], [1 ,2 ,1 , 1 ,1 ,1 , 1 ]), & ! derived types
50
50
c= text, z= [character (len= len (text)):: ], i= (0 .,1 .), j= (2 .,3 .), k= 4 , l= 5 , r= .true. , s= .true. , t= 7 ., u= 8 . & ! intrinsic types
51
51
)
52
52
53
53
associate(me= >this_image())
54
54
55
55
if (me== sender) then
56
56
message = content
57
- allocate (message% char_ptr, message% char_ptr_maxdim(1 ,1 ,2 , 1 ,1 ,1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ), source= text )
58
- allocate (message% cplx_ptr, message% cplx_ptr_maxdim(1 ,1 ,1 , 1 ,1 ,2 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ), source= (0 .,1 .))
59
- allocate (message% int_ptr , message% int_ptr_maxdim (1 ,1 ,1 , 1 ,1 ,1 , 1 , 1 , 2 , 1 , 1 , 1 , 1 , 1 , 1 ), source= 2 )
60
- allocate (message% bool_ptr, message% bool_ptr_maxdim(1 ,1 ,1 , 1 ,2 ,1 , 1 , 1 , 1 , 1 , 1 , 2 , 1 , 1 , 1 ), source= .true. )
61
- allocate (message% real_ptr, message% real_ptr_maxdim(1 ,1 ,1 , 1 ,1 ,1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 2 ), source= 3 . )
57
+ allocate (message% char_ptr, message% char_ptr_maxdim(1 ,1 ,2 , 1 ,1 ,1 , 1 ), source= text )
58
+ allocate (message% cplx_ptr, message% cplx_ptr_maxdim(1 ,1 ,1 , 1 ,1 ,2 , 1 ), source= (0 .,1 .))
59
+ allocate (message% int_ptr , message% int_ptr_maxdim (1 ,1 ,1 , 1 ,1 ,1 , 1 ), source= 2 )
60
+ allocate (message% bool_ptr, message% bool_ptr_maxdim(1 ,1 ,1 , 1 ,2 ,1 , 1 ), source= .true. )
61
+ allocate (message% real_ptr, message% real_ptr_maxdim(1 ,1 ,1 , 1 ,1 ,1 , 1 ), source= 3 . )
62
62
end if
63
63
64
64
call co_broadcast(message,source_image= sender)
0 commit comments