From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60151 invoked by alias); 25 Oct 2016 17:30:23 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 60095 invoked by uid 89); 25 Oct 2016 17:30:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SEMBACKSCATTER,RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=trend, Compatibility, expectations, Logical X-Spam-User: qpsmtpd, 2 recipients X-HELO: mtaout005-public.msg.strl.va.charter.net Received: from mtaout005-public.msg.strl.va.charter.net (HELO mtaout005-public.msg.strl.va.charter.net) (68.114.190.30) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 25 Oct 2016 17:30:18 +0000 Received: from impout003 ([68.114.189.18]) by mtaout005.msg.strl.va.charter.net (InterMail vM.9.00.023.01 201-2473-194) with ESMTP id <20161025173008.IZID7356.mtaout005.msg.strl.va.charter.net@impout003>; Tue, 25 Oct 2016 12:30:08 -0500 Received: from amda8.localdomain ([96.41.215.23]) by impout003 with charter.net id ztW71t0020Wrkg001tW7Re; Tue, 25 Oct 2016 12:30:08 -0500 X-Authority-Analysis: v=2.1 cv=ZLZZmBLb c=1 sm=1 tr=0 a=salB9WdMPIDduBH7JsZfrA==:117 a=salB9WdMPIDduBH7JsZfrA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=N659UExz7-8A:10 a=w0q8ME-uHj9A8pML7FMA:9 a=pILNOxqGKmIA:10 X-Auth-id: anZkZWxpc2xlQGNoYXJ0ZXIubmV0 Subject: Re: [PATCH, Fortran] DEC Compatibility: Logical operations on integers become bitwise ops with -fdec To: Fritz Reese , fortran , gcc-patches References: Cc: Steve Kargl From: Jerry DeLisle Message-ID: <5e737b97-bccf-2770-abcb-f548fadecff3@charter.net> Date: Tue, 25 Oct 2016 17:30:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2016-10/txt/msg02059.txt.bz2 On 10/25/2016 09:24 AM, Fritz Reese wrote: > All- > > Proposed here is another compatibility extension to the GNU Fortran > frontend which allows logical operations on integer operands with the > -fdec flag. In this case the logical operator is replaced with its > bitwise equivalent. > > For example, GNU Fortran by default (correctly) produces an error for > the expression "A .AND. B" when A and/or B are integers. With this > patch when the -fdec legacy compatibility flag is asserted, GNU > Fortran instead silently replaces the expression with "IAND(A, B)", > performing a bitwise-and on the integers A and B. This behavior is to > match the behavior of legacy compilers, and expectations of some > legacy code. > > This extension was originally implemented under its own flag > "-fdec-bitwise-ops", but following the recent trend I have just rolled > it into "-fdec". I thought the behavior might be too drastic for > -std=legacy, but if anyone has a different opinion I can certainly do > this with -std=legacy instead of -fdec. > > Bootstraps and regtests on x86_64-redhat-linux, OK for trunk? > I think this is OK. -fdec is sufficient Jerry