From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43726 invoked by alias); 11 Jul 2019 12:17:00 -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 43711 invoked by uid 89); 11 Jul 2019 12:16:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.1 required=5.0 tests=AWL,BAYES_00,KAM_COUK,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 spammy=privacyhtml, UD:privacy.html, privacy.html, H*M:4fa4 X-HELO: imap1.codethink.co.uk Received: from imap1.codethink.co.uk (HELO imap1.codethink.co.uk) (176.9.8.82) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Jul 2019 12:16:58 +0000 Received: from [167.98.27.226] (helo=[10.35.6.54]) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1hlY0M-0007GM-JQ; Thu, 11 Jul 2019 13:16:54 +0100 Subject: Re: [PATCH PR Fortran/89286] Intrinsic sign and GNU Extension To: Bernhard Reutner-Fischer , sgk@troutmask.apl.washington.edu Cc: fortran , gcc-patches References: <892ed9cb-9915-85c9-a3b7-5fe41861d8e8@codethink.co.uk> <20190710155240.GA75088@troutmask.apl.washington.edu> From: Mark Eggleston Message-ID: Date: Thu, 11 Jul 2019 12:22:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2019-07/txt/msg00891.txt.bz2 On 10/07/2019 17:20, Bernhard Reutner-Fischer wrote: > On 10 July 2019 17:52:40 CEST, Steve Kargl wrote: >> On Wed, Jul 10, 2019 at 02:50:47PM +0100, Mark Eggleston wrote: >>> The attached patch treats the intrinsic SIGN in the same way as MOD >> and >>> DIM as it has the same arguments. >>> >>> Tested using make -j 8 check-fortran on x86_64 >>> >>> Conditional compilation using #ifdef __GFC_REAL_16__ has been >> employed >>> where appropriate in the test cases so should be OK on platforms >> without >>> REAL(16). >>> >>> Change logs: >>> >>> gcc/fortran >>> >>>     Mark Eggleston  >>> >>>     PR fortran/89286 >>>         * check.c (gfc_check_sign): Deleted. > ChangeLog has to be in present tense per convention. > >>>     * intrinsic.c (add_functions): Call add_sym_2 with gfc_check_a_p >>>     instead of gfc_check_sign for "sign". >>>     * intrinsic.h: Remove declaration of gfc_check_sign. >>>     * iresolve.c (gfc_resolve_sign): Check for largest kind of the >> actual >>>     arguments and convert the smaller. Set return kind to be the >> largest. >>>     * simplify.c (gfc_simplify_sign): Use the largest kind of the >> actual >>>     arguments for return >>>     * intrinsic.texi: Add GNU extension notes for return value to >> SIGN. >>> gcc/testsuite >>> >>>     Mark Eggleston >>> >>>     PR fortran/89240 >>>     * gfortran.dg/sign_gnu_extension_1.f90: New test. >>>     * gfortran.dg/sign_gnu_extension_2.f90: New test. >>>     * gfortran.dg/pr78619.f90: Check for "must have" instead of >> "must be". >>> If OK please can someone commit as I do not have the privileges. >>> >> We really need to get you commit access to the tree. >> >> I also am not a fan of this type of change. Having spent the >> last few days working on fixing BOZ to conform to F2018, I'm >> finding all sorts of undocumented "extensions". Personally, >> I think gfortran should be moving towards the standard by >> deprecating of these types of extensions. I agree. I think that -std=gnu should not be the default, if gnu extensions are required you have to ask for them. > At least make them explicit under explicit extension or at least -legacy or whatever its called. > > thanks, I agree, at the moment the GNU extension is silently supported by DIM and MOD > > -- https://www.codethink.co.uk/privacy.html