Skip to content

Commit 63d1ffa

Browse files
committed
Fix compile warnings LOGICAL -> INT
Fix compile warnings about Logical to Integer conversions using the transfer()-function.
1 parent 235167d commit 63d1ffa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/tests/unit/simple/random_init.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ program test_random_init
5454
if (me .eq. 1) then
5555
seed_eq = 0
5656
else
57-
seed_eq = any(random_num .eq. from_master)
57+
seed_eq = transfer(any(random_num .eq. from_master), 0)
5858
end if
5959
call co_max(seed_eq, 1)
6060

@@ -73,7 +73,7 @@ program test_random_init
7373
if (me .eq. 1) then
7474
seed_eq = 0
7575
else
76-
seed_eq = any(random_num .eq. from_master)
76+
seed_eq = transfer(any(random_num .eq. from_master), 0)
7777
end if
7878
call co_max(seed_eq, 1)
7979

@@ -91,7 +91,7 @@ program test_random_init
9191
from_master = random_num
9292
end if
9393
call co_broadcast(from_master, 1)
94-
seed_eq = all(random_num .eq. from_master)
94+
seed_eq = transfer(all(random_num .eq. from_master), 0)
9595
call co_min(seed_eq, 1)
9696

9797
print *,"me=", me, ", rand_num=", random_num, ", from_master=", from_master, ", seed_eq=", seed_eq
@@ -109,7 +109,7 @@ program test_random_init
109109
from_master = random_num
110110
end if
111111
call co_broadcast(from_master, 1)
112-
seed_eq = all(random_num .eq. from_master)
112+
seed_eq = transfer(all(random_num .eq. from_master), 0)
113113
call co_min(seed_eq, 1)
114114

115115
if (me .eq. 1 .and. seed_eq .eq. 0) then

0 commit comments

Comments
 (0)