From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.smtpout.orange.fr (smtp-12.smtpout.orange.fr [80.12.242.12]) by sourceware.org (Postfix) with ESMTPS id 643FC3858C83 for ; Sat, 22 Apr 2023 09:25:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 643FC3858C83 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orange.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=orange.fr Received: from [192.168.1.15] ([86.215.161.51]) by smtp.orange.fr with ESMTPA id q9V0pKsytLf5zq9V5pzLEa; Sat, 22 Apr 2023 11:25:48 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1682155548; bh=vQSjkf7LVE/c1shUBGY6eZ106QULo+Ub3hIrpFPxLpA=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=iTXCni2QEigYE7K8bgJIXINpLe3nSzT9LXt7gcI8luSsexpz4rfyfDdInRVMV81nY QJzRFZO90nd+nWGffB/Y5bdgXRCnBF4zBlMw/3XS4bR1/C582JZXIDUeL9X0a7jNDC 9jWL9dxU1aKe2g8QPM+l4d8eyCnVVUNMo8uuRBMpK01RWPooNkEDrId9GMHAqyGV3c 16G1/eO9zYbtaG8hd8s2RRd6n1ibO/sWLWTDWxQ2c3YdFoAMyb8z95Cx0lRl5yBNM+ nblLcx63Lt+ddAafNLlvUnby9Bu0UVmITVVux74Tt80Mtat1qVEqkyn0FD3Oz4N95N UAMHb7DnA25BA== X-ME-Helo: [192.168.1.15] X-ME-Auth: bW9yaW4tbWlrYWVsQG9yYW5nZS5mcg== X-ME-Date: Sat, 22 Apr 2023 11:25:48 +0200 X-ME-IP: 86.215.161.51 Message-ID: <311f891f-8fe7-72d3-de38-1b0910aed02c@orange.fr> Date: Sat, 22 Apr 2023 11:25:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH] Fortran: function results never have the ALLOCATABLE attribute [PR109500] Content-Language: en-US To: Harald Anlauf , fortran , gcc-patches Cc: kargl@gcc.gnu.org References: From: Mikael Morin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,JMQ_SPF_NEUTRAL,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello, Le 20/04/2023 à 22:01, Harald Anlauf via Fortran a écrit : > Dear all, > > Fortran 2018 added a clarification that the *result* of a function > whose result *variable* has the ALLOCATABLE attribute is a *value* > that itself does not have the ALLOCATABLE attribute. > > For those interested: there was a thread on the J3 mailing list > some time ago (for links see the PR). > > The patch which implements a related check was co-authored with > Steve and regtested by him. Testcase verified against NAG. > > OK for mainline (gcc-14)? > Looks good in principle, but I think the real fix should be in the gfc_expr_attr function, which copies all the attributes (including allocatable) in the EXPR_FUNCTION case. How would the testsuite react if that attribute was cleared there? Is your patch still needed if gfc_expr_attr is fixed? Mikael