Skip to content

Commit acc9833

Browse files
author
Alessandro Fanfarillo
committed
Removed warnings during compilation (thanks to Paul Richard Thomas)
Signed-off-by: Alessandro Fanfarillo <fanfarillo@ing.uniroma2.it>
1 parent 2567838 commit acc9833

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/mpi/mpi_caf.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2042,26 +2042,26 @@ PREFIX (co_reduce) (gfc_descriptor_t *a, void *(*opr) (void *, void *), int opr_
20422042
MPI_Op op;
20432043
if(GFC_DESCRIPTOR_TYPE(a) == BT_INTEGER)
20442044
{
2045-
foo_int32_t = opr;
2045+
foo_int32_t = (typeof(foo_int32_t))opr;
20462046
MPI_Op_create(redux_int32, 1, &op);
20472047
}
20482048
else if(GFC_DESCRIPTOR_TYPE(a) == BT_REAL)
20492049
{
20502050
if(GFC_DESCRIPTOR_SIZE(a) == sizeof(float))
20512051
{
2052-
foo_float = opr;
2052+
foo_float = (typeof(foo_float))opr;
20532053
MPI_Op_create(redux_real32, 1, &op);
20542054
}
20552055
else
20562056
{
2057-
foo_double = opr;
2057+
foo_double = (typeof(foo_double))opr;
20582058
MPI_Op_create(redux_real64, 1, &op);
20592059
}
20602060
}
20612061
else if(GFC_DESCRIPTOR_TYPE(a) == BT_LOGICAL)
20622062
{
2063-
foo_int32_t = opr;
2064-
MPI_Op_create(redux_int32, 1, &op);
2063+
foo_int32_t = (typeof(foo_int32_t))opr;
2064+
MPI_Op_create(redux_int32, 1, &op);
20652065
}
20662066
else
20672067
{

src/tests/unit/collectives/co_reduce.F90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module co_intrinsics_module
4646
contains
4747

4848
subroutine co_all_logical(a)
49-
logical, intent(inout) :: a
49+
logical, intent(inout) :: a(:)
5050
call co_reduce(a,and)
5151
contains
5252
pure function and(lhs,rhs) result(lhs_and_rhs) bind(C,name="and")
@@ -98,10 +98,10 @@ program main
9898

9999
! Verify that every image has a "true" variable with the value .true.
100100
verify_co_reduce_logical: block
101-
logical :: true=.true.
101+
logical,dimension(10) :: true=.true.
102102
sync all
103103
call co_all(true)
104-
if (true) then
104+
if (all(true .eqv. .true.)) then
105105
logical_passes=.true.
106106
else
107107
write(error_unit,"(2(a,i2))") "co_reduce fails for logical argument with result (",true,") on image",this_image()

0 commit comments

Comments
 (0)