From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 66557 invoked by alias); 12 Nov 2019 14:21:43 -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 66544 invoked by uid 89); 12 Nov 2019 14:21:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:794, H*MI:sk:9D21DC9, H*f:sk:9D21DC9, H*i:sk:9D21DC9 X-HELO: esa1.mentor.iphmx.com Received: from esa1.mentor.iphmx.com (HELO esa1.mentor.iphmx.com) (68.232.129.153) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Nov 2019 14:21:42 +0000 IronPort-SDR: 0ko7mUFSU/AfWJcaCwbKuIaus1aegDBBoEN2gt18N7wzB8oRyyZYLHa/NqSSiJaXUTd2C6tdi0 t70YowC7ERZKoZiwJfdSgkMGzM76pWFHPx1e7eSBldb20AheOkJ5bYaYUFkljAjsp7o3r0IShh IMqAoqmOgmVSIiKk1ajZE2m0kBNuXmAav+Nl+FqqyfjsZ7Vy1dIPVrDFjrsFKLp1leB4IykayL doRKVcHRJoJ5T6zzvpNacRQJR689lioMVzK0wTlMM1/NCqrkrAWtCDdfD8Td+d4lqiKV1855zv mfA= Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 12 Nov 2019 06:21:40 -0800 IronPort-SDR: uLfh9aXZlrAZgv/WoqNCrGvuHv2ceQALcA96dfnyDS4pTsx4kNyo3BOEAbtfxS/CXhctIZbX4B H1z/7MDk5NWBFHvQislCf4/O3v6bWigg4XVtAiaYteV53WYrDfjhYudywZDHRnqkRuRm0gm0jz 8yPT1QJgbuYAlNB7eKzmyND3wrJhqJ01YATvFTUuR3x6Miemv8G1kbmWQMAZ8YH0y5Quyr61Co mBV3aMOWkfrkynY/Ri5Qq8JLT1KX/gCG9slW4xFSgE7fAlj12lrV7uELGUMz9dyfIZM4GusKp8 4J8= Subject: Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures To: =?UTF-8?Q?Thomas_K=c3=b6nig?= , Janne Blomqvist CC: "fortran@gcc.gnu.org" , gcc-patches References: <9D21DC90-7EE3-4BBB-8838-06A7F1AC2336@tkoenig.net> From: Tobias Burnus Message-ID: <7198e48e-e803-af89-39f3-c93f0cac9c91@codesourcery.com> Date: Tue, 12 Nov 2019 14:33:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: <9D21DC90-7EE3-4BBB-8838-06A7F1AC2336@tkoenig.net> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Return-Path: tobias@codesourcery.com X-IsSubscribed: yes X-SW-Source: 2019-11/txt/msg00924.txt.bz2 Hi Thomas, On 11/12/19 1:42 PM, Thomas König wrote: >> Ah, of course. I should have said module procedures. Or even module procedures without bind(C)? > It would probably be the latter. The change would actually be rather small: If conditions are met, just add attr.value for INTENT(IN). This is something we should probably do when we are forced into doing an ABI change by other circumstances. Will this still work if one does: module m contains integer function val(y) integer, intent(in) :: y val = 2*y end function val end module m use m interface integer function proc(z) integer, intent(in) :: z end function proc end interface procedure(proc), pointer :: ff ff => val print *, ff(10) end Tobias