From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2437 invoked by alias); 25 Jun 2006 04:32:00 -0000 Received: (qmail 2419 invoked by uid 22791); 25 Jun 2006 04:32:00 -0000 X-Spam-Check-By: sourceware.org Received: from smtp7.orange.fr (HELO smtp7.orange.fr) (193.252.22.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 25 Jun 2006 04:31:58 +0000 Received: from [10.0.0.1] (ANice-106-1-6-165.w80-11.abo.wanadoo.fr [80.11.200.165]) by mwinf0709.orange.fr (SMTP Server) with ESMTP id 6AA6D1C00085; Sun, 25 Jun 2006 06:31:55 +0200 (CEST) X-ME-UUID: 20060625043155436.6AA6D1C00085@mwinf0709.orange.fr Message-ID: <449E11B2.3070400@wanadoo.fr> Date: Sun, 25 Jun 2006 07:09:00 -0000 From: Paul Thomas User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060212 Fedora/1.7.12-5 MIME-Version: 1.0 To: Steve Kargl Cc: "'fortran@gcc.gnu.org'" , patch Subject: Re: [Patch, fortran] References: <449C20DA.1060503@wanadoo.fr> <20060624153211.GA58005@troutmask.apl.washington.edu> In-Reply-To: <20060624153211.GA58005@troutmask.apl.washington.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2006-06/txt/msg01352.txt.bz2 Steve Kargl wrote: > + if (type == BT_LOGICAL && cp->low->expr_type == EXPR_CONSTANT) > + { > + if (cp->low->value.logical & seen_logical) > > Do you want & or && here? The arithmetic and was intentional. However, I realised in replying to you that the first operand is incorrect; the patch only fixes repeated .TRUE.! This is what I will submit: if (type == BT_LOGICAL && cp->low->expr_type == EXPR_CONSTANT) { int value; value = cp->low->value.logical == 0 ? 2 : 1; if (value & seen_logical) { gfc_error ("constant logical value in CASE statement " "is repeated at %L", &cp->low->where); t = FAILURE; break; } seen_logical |= value; } > > Otherwise, the patch is OK. Many thanks for this and the review of the FORALL patch. Paul