From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89501 invoked by alias); 8 Aug 2018 05:41:15 -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 89450 invoked by uid 89); 8 Aug 2018 05:41:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=Having, H*i:sk:2F3C72A, business, act X-HELO: mail-yw1-f51.google.com Received: from mail-yw1-f51.google.com (HELO mail-yw1-f51.google.com) (209.85.161.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 Aug 2018 05:41:13 +0000 Received: by mail-yw1-f51.google.com with SMTP id q129-v6so716709ywg.8 for ; Tue, 07 Aug 2018 22:41:13 -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=KIjkEYbydIE1/DzhPGEDW8KEgS0w0xJqUBy4ELQiuZo=; b=KzJ+hdrWTtAHAVGFydiC08nrWj6FQ41mvJcXrZd4F0mWrCIZ+xr/5HTZIDilL5RI+v X+UKCxxOrNQYU1u30i8BWTsAHRfWnZU/HIW9xtyKJUsULJoDyinagmJn6Fx75cqJ9kbF DsKMWsx+dbkM1k/gG6wyNOFSE/PKvHs5ZN9QQeJMz3uqZ3rpAKUA5Ica2AlD9+Rlo43o csURUAbx2ixotWc48zVWb/lM1mlY63nNXuTFThCr/2f1SxBvLeJb0Wl2s6Hc53glIhCu j33Vib6EOU1FSqT+35/pIyX/jqHEtQQK+qdCYhBX453HrKHY1N1def85HHnCaVvet4ce s6IQ== MIME-Version: 1.0 Sender: jaydub66@gmail.com Received: by 2002:a0d:fe84:0:0:0:0:0 with HTTP; Tue, 7 Aug 2018 22:41:11 -0700 (PDT) In-Reply-To: <2F3C72A3-D2A6-479B-937F-316A1A4B1183@tkoenig.net> References: <707691ED-E885-4038-B493-E1E97FE96358@lps.ens.fr> <2F3C72A3-D2A6-479B-937F-316A1A4B1183@tkoenig.net> From: Janus Weil Date: Wed, 08 Aug 2018 05:41:00 -0000 Message-ID: Subject: Re: [Patch, Fortran] PR 57160: short-circuit IF only with -ffrontend-optimize To: =?UTF-8?Q?Thomas_K=C3=B6nig?= Cc: =?UTF-8?Q?Dominique_d=27Humi=C3=A8res?= , Thomas Koenig , gfortran Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00033.txt.bz2 Hi Thomas, >> How is that even an option?!? gfortran accepts invalid code. What's >> wrong with fixing that? > > Just a general remark, I am on a business trip in the US at the moment. > > There are errors which the compiler is required to diagnose, when a const= raint is violated. And there are errors which the compiler is not required = to catch, those marked with =E2=80=9Eshall=E2=80=9C in the standard. > > Issuing an error or a warning for those is always a balancing act because= if the possibility of false positives. sure, I'm aware of that general fact. However, it's certainly a good idea to diagnose everything you can, no matter if the standard requires you to do that or not. Having undetectably invalid code does not increase the appeal of the compiler (or the language in general). Just like having compiler-dependent code. All of that is a major turn-off (at least to me). I'll also note that my approach to fixing PR 57160 had zero false positives. Cheers, Janus