------- Comment #4 from tobi at gcc dot gnu dot org  2005-11-02 12:37 -------
I was curious, and tried below patch, changing .EQV. to .NEQV. in the testcase,
and still we don't get the "right" result, since our logical type is a real
logical, in that only the lowest bit is considered.  I did some checking, and
our output functions seem to agree with the generated code about what values
are true and what values are false, i.e.
    print *,i, lo1 , lo1 .eqv. lo2, lo1 .eqv. .true.
    if (lo1 .eqv. lo2) PRINT *, "2nd column true"
    if (lo1 .eqv. .true.) PRINT *, "3rd column true"
would not do fancy stuff.

Index: trans-expr.c
===================================================================
--- trans-expr.c        (revision 106379)
+++ trans-expr.c        (working copy)
@@ -988,12 +988,17 @@ gfc_conv_expr_op (gfc_se * se, gfc_expr 
       break;

     case INTRINSIC_NE:
-    case INTRINSIC_NEQV:
       code = NE_EXPR;
       checkstring = 1;
       lop = 1;
       break;

+    case INTRINSIC_NEQV:
+      code = TRUTH_XOR_EXPR;
+      checkstring = 1;
+      lop = 1;
+      break;
+
     case INTRINSIC_GT:
       code = GT_EXPR;
       checkstring = 1;


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22495

Reply via email to