From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15580 invoked by alias); 12 Nov 2019 17:04:32 -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 15563 invoked by uid 89); 12 Nov 2019 17:04:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=H*i:sk:7198e48, H*f:sk:7198e48, H*MI:sk:7198e48 X-HELO: mo4-p00-ob.smtp.rzone.de Received: from mo4-p00-ob.smtp.rzone.de (HELO mo4-p00-ob.smtp.rzone.de) (85.215.255.22) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Nov 2019 17:04:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1573578268; s=strato-dkim-0002; d=tkoenig.net; h=To:In-Reply-To:Cc:References:Message-Id:Date:Subject:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=qZwtaXhp1ogFtQmnEddG1UfADMrJeVvph3+A24cYMwo=; b=XgaLqxt6IK8bpXvK/Nr+rk2a358P8Xli9rCwDozev3/gXWPFl/r0YZzElky/i4KO7l VVvZBT46GcKKDtQFx7cBLPvDsWuZbqilTXJfVbTwKRNM9PUcFpsPKw5+rZlbU2Siwax9 DWGsqYVy5Lc+qhhKKDKzBCCb3Jj+oEadviXmKeAU9xeoXTIIgat1XgTtAv8ENoXQDChX h+wgryD9MZHka1vuvY3uRS3H7n86ArGA35IPqn49brLuA1TQZMjjWN27CVshHpckSRwO d9RoRc4IRCpno9pg/+HkL+Jd95ClXKNx9FPk17LB6FUgFNSRPJTPm9rk0pIGshHYd512 rzBA== Received: from [10.51.255.220] by smtp.strato.de (RZmta 44.29.0 DYNA|AUTH) with ESMTPSA id q00c85vACH4Otzu (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Tue, 12 Nov 2019 18:04:24 +0100 (CET) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: =?utf-8?Q?Thomas_K=C3=B6nig?= Mime-Version: 1.0 (1.0) Subject: Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures Date: Tue, 12 Nov 2019 17:22:00 -0000 Message-Id: References: <7198e48e-e803-af89-39f3-c93f0cac9c91@codesourcery.com> Cc: Janne Blomqvist , "fortran@gcc.gnu.org" , gcc-patches In-Reply-To: <7198e48e-e803-af89-39f3-c93f0cac9c91@codesourcery.com> To: Tobias Burnus X-SW-Source: 2019-11/txt/msg00946.txt.bz2 Hi Tobias, > On 11/12/19 1:42 PM, Thomas K=C3=B6nig wrote: >>> Ah, of course. I should have said module procedures. Or even module pro= cedures without bind(C)? >> It would probably be the latter. The change would actually be rather sma= ll: If conditions are met, just add attr.value for INTENT(IN). This is some= thing we should probably do when we are forced into doing an ABI change by = other circumstances. >=20 > Will this still work if one does: >=20 > module m > contains > integer function val(y) > integer, intent(in) :: y > val =3D 2*y > end function val > end module m >=20 > use m > interface > integer function proc(z) > integer, intent(in) :: z > end function proc > end interface > procedure(proc), pointer :: ff > ff =3D> val > print *, ff(10) > end You are right, it would not work. So, scratch that idea. Maybe we should co= mmit this as a test case so nobody gets funny ideas in two year=E2=80=98s t= ime =F0=9F=98=89 So, I think we can then discuss the original patch. Regards Thomas