2 ! { dg-additional-options "-fdump-tree-original -fcoarray=lib" }
5 ! Test case inspired by code submitted by Damian Rousson
13 integer, allocatable
:: j
17 integer, parameter :: source_image
= 1
19 if (this_image() == source_image
) then
24 call co_broadcast(foo
, source_image
)
26 if ((foo
%i
/= 2) .or
. (foo
%j
/= 3)) error
stop 1
31 ! Wrong code generation produced too many temp descriptors
32 ! leading to stacked descriptors handed to the co_broadcast.
33 ! This lead to access to non exsitant memory in opencoarrays.
34 ! In single image mode just checking for reduced number of
35 ! descriptors is possible, i.e., execute always works.
36 ! { dg-final { scan-tree-dump-times "desc\\.\[0-9\]+" 12 "original" } }