From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5485 invoked by alias); 15 Jul 2005 17:15:52 -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 5476 invoked by uid 48); 15 Jul 2005 17:15:49 -0000 Date: Fri, 15 Jul 2005 17:23:00 -0000 From: "reichelt at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20050715171548.22503.reichelt@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug fortran/22503] New: Suggest to use .EQV. when comparing logicals with .EQ. X-Bugzilla-Reason: CC X-SW-Source: 2005-07/txt/msg01918.txt.bz2 List-Id: Consider the following code snippet: =========================== subroutine FOO logical I I = I .eq. I end subroutine FOO =========================== g77 used to give the following error message with the suggesiton what to do: test.f: In subroutine `foo': test.f:3: I = I .eq. I 1 2 3 Use .EQV./.NEQV. instead of .EQ./.NE. at (2) for LOGICAL operands at (1) and (3) gfortran only gives: In file test.f90:3 I = I .eq. I 1 Error: Operands of comparison operator '.eq.' at (1) are LOGICAL(4)/LOGICAL(4) A suggestion to use .EQV./.NEQV. instead would be nice (especially since other compilers accept the code without modification). -- Summary: Suggest to use .EQV. when comparing logicals with .EQ. Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: diagnostic Severity: enhancement Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22503