From owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org  Fri Sep 28 12:13:39 2012
Return-Path: <owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org>
X-Original-To: sc22wg5-dom8
Delivered-To: sc22wg5-dom8@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id B15603569B5; Fri, 28 Sep 2012 12:13:39 +0200 (CEST)
Delivered-To: sc22wg5@open-std.org
Received: from ppsw-41.csi.cam.ac.uk (ppsw-41.csi.cam.ac.uk [131.111.8.141])
	by www.open-std.org (Postfix) with ESMTP id A38423569B0
	for <sc22wg5@open-std.org>; Fri, 28 Sep 2012 12:13:37 +0200 (CEST)
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: not scanned
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from hermes-1.csi.cam.ac.uk ([131.111.8.51]:45482)
	by ppsw-41.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.156]:25)
	with esmtpa (EXTERNAL:nmm1) id 1THXZg-00079M-RB (Exim 4.72)
	(return-path <nmm1@hermes.cam.ac.uk>); Fri, 28 Sep 2012 11:13:36 +0100
Received: from prayer by hermes-1.csi.cam.ac.uk (hermes.cam.ac.uk)
	with local (PRAYER:nmm1) id 1THXZg-0000x7-D1 (Exim 4.72)
	(return-path <nmm1@hermes.cam.ac.uk>); Fri, 28 Sep 2012 11:13:36 +0100
Received: from [131.111.10.113] by webmail.hermes.cam.ac.uk
	with HTTP (Prayer-1.3.5); 28 Sep 2012 11:13:36 +0100
Date: 28 Sep 2012 11:13:36 +0100
From: "N.M. Maclaren" <nmm1@cam.ac.uk>
To: Malcolm Cohen <malcolm@nag-j.co.jp>
Cc: WG5 <sc22wg5@open-std.org>
Subject: Re: [ukfortran] (SC22WG5.4806) (j3.2006) WG5 letter ballot 4 on Fortran
 2008 interpretations
Message-ID: <Prayer.1.3.5.1209281113360.30216@hermes-1.csi.cam.ac.uk>
In-Reply-To: <20120928083545.732373569B2@www.open-std.org>
References: <20120914232724.BB7E5356938@www.open-std.org><20120925194814.26C3D356934@www.open-std.org>
 <20120928070255.A5ABE3569B2@www.open-std.org>
 <20120928083545.732373569B2@www.open-std.org>
X-Mailer: Prayer v1.3.5
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset=ISO-8859-1
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

On Sep 28 2012, Malcolm Cohen wrote:
>>
>>F08/0067 C
>>
>>I agree that the program should not be standard conforming, and I agree
>>that the edit provided ensures that it is not.  I do not agree with the
>>rationale given for the answer.  Whether the invocation of SUB2 in SUB1
>>does or does not require the shape of A depends on the argument passing
>>conventions used by the processor.  While all or almost all existing
>>Fortran processors use copy-in/copy-out to pass the array argument to
>>SUB2, the Fortran standard does not require a conforming processor to
>>use copy-in/copy-out.  Other argument passing conventions exist that do
>>not require making a copy in this case.  Those conventions do not
>>require the shape or size of A to be known.
>
> Yes, but no-one uses such a convention. (Non-polymorphic assumed-size 
> arrays get passed with "stride" information, are you serious?)

Why not?  The fact that no current Fortran compilers use it doesn't
mean either that it has never been used, or that it won't be in the
future.

> I mean really, one could argue that assumed-size arrays can be used 
> everywhere because you never need to know the shape, you only need to 
> know the stride and the location of the last element.

No, because (as you know) making that change would force current
compilers to change.  It is unreasonable to require assumed-size arrays
to be passed as C-style pointers - and even more unreasonable to forbid
that.

A reasonable tweak to resolve this concern would be to change the
answer to:

    The invocation of SUB2 in SUB1 allows a processor to require the
    shape, and therefore the example is not standard-conforming.


Regards,
Nick Maclaren.


