From 671dbea544b3d6649ce2d4394972f533f60a5eca Mon Sep 17 00:00:00 2001
From: George Bosilca <bosilca@icl.utk.edu>
Date: Wed, 14 Jul 2004 19:16:13 +0000
Subject: [PATCH] LXOR is a logical xor not a bitwise one, so using the ^
 operation is not correct. Advance the buffers for the *LOC operations.

This commit was SVN r1721.
---
 src/op/op_predefined.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/op/op_predefined.c b/src/op/op_predefined.c
index 7f69fdd3c1..7c50abf1b4 100644
--- a/src/op/op_predefined.c
+++ b/src/op/op_predefined.c
@@ -70,9 +70,10 @@
     int i; \
     ompi_op_predefined_##type_name##_t *a = (ompi_op_predefined_##type_name##_t*) in; \
     ompi_op_predefined_##type_name##_t *b = (ompi_op_predefined_##type_name##_t*) out; \
-    for (i = 0; i < *count; ++i) { \
+    for (i = 0; i < *count; ++i, a++, b++ ) { \
       if (a->v op b->v) { \
-        *b = *a; \
+        b->v = a->v; \
+        b->k = a->k; \
       } else if (a->v == b->v) { \
         b->k = (b->k < a->k ? b->k : a->k); \
       } \
@@ -227,7 +228,7 @@ FUNC_FUNC(lor, fortran_logical, ompi_fortran_logical_t)
  *************************************************************************/
 
 #undef current_func
-#define current_func(a, b) ((a) ^ (b))
+#define current_func(a, b) ((a ? 1 : 0) ^ (b ? 1: 0))
 /* C integer */
 FUNC_FUNC(lxor, int, int)
 FUNC_FUNC(lxor, long, long)