From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22508 invoked by alias); 2 Nov 2005 12:37:42 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 22493 invoked by uid 48); 2 Nov 2005 12:37:37 -0000 Date: Wed, 02 Nov 2005 12:37:00 -0000 Message-ID: <20051102123737.22492.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/22495] Different ideas about .true. and .false. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "tobi at gcc dot gnu dot org" X-SW-Source: 2005-11/txt/msg00238.txt.bz2 List-Id: ------- 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