From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61983 invoked by alias); 8 Aug 2018 18:21:05 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 61970 invoked by uid 89); 8 Aug 2018 18:21:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=AWL,BAYES_20,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=controversial, H*f:sk:8656c8d, hiding, schwarb X-HELO: mail-yw1-f66.google.com Received: from mail-yw1-f66.google.com (HELO mail-yw1-f66.google.com) (209.85.161.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 Aug 2018 18:21:01 +0000 Received: by mail-yw1-f66.google.com with SMTP id v197-v6so2262296ywg.3 for ; Wed, 08 Aug 2018 11:21:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=1Q9yGgSx22f6mgSIakFWKmrNb4hndPydcnJi/qxrTek=; b=Zz6JvjqaQeC/IGCH+ZVWuCG09tgf5bsSAgHcqZkPPjGuhkohcz/tNbK/Nx7HMlHA2A FABxITxJyigxsU/ABIi3bANB7H4shBoCxnvhXELc74hpW1V8BIC/7iPVPh4iWmIqD2pd rytMJ5vxBTWD5nBy8eIdzJlrxEEQgceHdO8m8qlpy+2bGrY8sOoQrmpWb+qFfoRjxFdR Pm6HcHIyhAPXgIdBa9BHoJ7ZIw96rqxlQ6oodtpETzNk1zT6xx4bqxsRMYEcPdB1AJSj xXJki74H/EOvNnggTmOOavlKV+J1iDjTHsK8t4oy8WXmhIMvV3x+SkTit6Bkl505j+lq FQHw== MIME-Version: 1.0 Sender: jaydub66@gmail.com Received: by 2002:a0d:fe84:0:0:0:0:0 with HTTP; Wed, 8 Aug 2018 11:20:58 -0700 (PDT) In-Reply-To: References: <707691ED-E885-4038-B493-E1E97FE96358@lps.ens.fr> <8656c8dd-7a0b-48c0-9ff8-37319db96897@gmx.ch> From: Janus Weil Date: Wed, 08 Aug 2018 18:21:00 -0000 Message-ID: Subject: Re: [Patch, Fortran] PR 57160: short-circuit IF only with -ffrontend-optimize To: Arjen Markus Cc: Manfred Schwarb , gfortran Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00038.txt.bz2 Hi all, since there seems to be significant support for this after all, I just rebased the last patch version and pushed it to github (I sincerely hope gcc will officially make the switch to git very soon): https://github.com/janusw/gcc/commit/35aae880ff2b3d4a9f6a9c821376fb51020296= 1c This is still the most reasonable approach I can see. And I'd still be grateful for (technical) comments on the patch. What's the procedure in GCC for dealing with such controversial patches? The procedure for simple cases is: The patch author asks for review, an authorized reviewer/maintainer approves it or asks for improvements. What happens if that fails? Is there any rule on how decisions are to be made in the non-trivial case? Cheers, Janus 2018-08-08 13:29 GMT+02:00 Arjen Markus : > FWIW, I second Manfred's opinion. I have no strong preference to such > short-circuiting or against it, but I feel that putting the programmer > in control is the better option. > > Regards, > > Arjen > > 2018-08-08 13:22 GMT+02:00 Janus Weil : >> Oh, look, a reasonable person! Where have you been hiding all this >> time? And is there more of your kind in that place? ;D >> >> >> >> 2018-08-08 10:35 GMT+02:00 Manfred Schwarb : >>> Hi Janus, hi Dominique, >>> >>> I did not raise my voice so far, as it is not so terribly relevant I gu= ess, >>> nevertheless... >>> >>> Am 07.08.2018 um 19:14 schrieb Janus Weil: >>>> 2018-08-07 12:11 GMT+02:00 Dominique d'Humi=C3=A8res : >>>>> >>>>>> It's so easy to scream "bullshit", and so hard to find a good >>>>>> solution. Still, we need one =E2=80=A6 >>>>> >>>>> Sorry if I have not been clear enough. I see only two >>>>> sensible solutions: >>>>> >>>>> (1) The statu quo, closing the PR as WONTFIX >>>> >>>> How is that even an option?!? gfortran accepts invalid code. What's >>>> wrong with fixing that? >>>> >>>> If your aim is to keep "the status quo" (read: a compiler with >>>> gazillions of bugs), why don't we just shut down bugzilla altogether? >>>> >>>> >>>>> (2) Introduce a new option, for instance >>>>> -fshort-circuit (default) for the short-circuit evaluation >>>>> -fno-short-circuit to force the evaluation of both expressions. >>>> >>>> For starters, no one will find a bug in his code if it requires >>>> -fsome-obscure-option-that-nobody-knows. >>>> >>>> Also I could ask the innocent question why -fshort-circuit should be >>>> the default, but I guess I won't bother to go there. >>>> >>> >>> I think both of you are right to some degree. I think it is a (good) cu= stom >>> in GCC to couple major optimizations with its own option flag. And to a= ctivate >>> it for some -Ox levels. >>> Because IMHO it is just this, a bog ordinary optimization. >>> And usually, optimizations which obfuscate the control flow and degrade= debug-ability >>> are deactivated at level -O0. >>> Why can't this be handled just like any other optimization? >>> >>> Cheers, >>> Manfred >>> >>> >>> PS: left-to-right short-circuiting is very handy, indeed. But I think i= t would be >>> wrong to nail down some behavior in gfortran which is not mandated = by the standards. >>> I rather would prefer to aggressively implement some explicitly non= -standard .ANDELSE. >>> (or similar) syntax and not to wait for the committees. FORTRAN has= a long tradition >>> of compilers driving progress and standards to follow, after all... >>> >>> >>>> I still find it deeply unsatisfying that gfortran is incompatible with >>>> other compilers on a very fundamental level. And I find it very >>>> disturbing that no one even cares. Anyway, I'm kinda through with this >>>> whole issue. I guess I'll just stop caring as well. >>>> >>>> Goodbye ... >>>> >>>