Skip to content

Commit 523b45e

Browse files
committed
Allocate destination array in simple testcase
1 parent c74438c commit 523b45e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/tests/unit/collectives/test-for-alessandro.f90

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ program main
1111

1212
alloc_content%vector = [1,2,3,4]
1313

14-
if (this_image()==sender) alloc_message = alloc_content
14+
if (this_image()==sender) then
15+
alloc_message = alloc_content
16+
else
17+
allocate(alloc_message%vector(4))
18+
end if
19+
20+
sync all
1521

1622
call co_broadcast(alloc_message,source_image=sender)
1723
if ( any(alloc_message%vector /= alloc_content%vector) ) error stop "Test failed."

0 commit comments

Comments
 (0)