From owner-sc22wg5@open-std.org  Sun Sep 26 20:13:06 2010
Return-Path: <owner-sc22wg5@open-std.org>
X-Original-To: sc22wg5-dom8
Delivered-To: sc22wg5-dom8@www2.open-std.org
Received: by www2.open-std.org (Postfix, from userid 521)
	id A04D6C3BA0A; Sun, 26 Sep 2010 20:13:06 +0200 (CET DST)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
X-Greylist: delayed 1109 seconds by postgrey-1.18 at www2.open-std.org; Sun, 26 Sep 2010 20:13:05 CEST
Received: from ppsw-33.csi.cam.ac.uk (ppsw-33.csi.cam.ac.uk [131.111.8.133])
	by www2.open-std.org (Postfix) with ESMTP id F0C51C178E3
	for <sc22wg5@open-std.org>; Sun, 26 Sep 2010 20:13:05 +0200 (CET DST)
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-2.csi.cam.ac.uk ([131.111.8.54]:56888)
	by ppsw-33.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.159]:25)
	with esmtpa (EXTERNAL:nmm1) id 1OzvQo-0006PL-hO (Exim 4.72)
	(return-path <nmm1@hermes.cam.ac.uk>); Sun, 26 Sep 2010 18:54:34 +0100
Received: from prayer by hermes-2.csi.cam.ac.uk (hermes.cam.ac.uk)
	with local (PRAYER:nmm1) id 1OzvQo-0005Dk-ED (Exim 4.67)
	(return-path <nmm1@hermes.cam.ac.uk>); Sun, 26 Sep 2010 18:54:34 +0100
Received: from [83.67.89.123] by webmail.hermes.cam.ac.uk
	with HTTP (Prayer-1.3.3); 26 Sep 2010 18:54:34 +0100
Date: 26 Sep 2010 18:54:34 +0100
From: "N.M. Maclaren" <nmm1@cam.ac.uk>
To: sc22wg5@open-std.org
Subject: Has something dropped out of Fortran 2008?
Message-ID: <Prayer.1.3.3.1009261854340.16471@hermes-2.csi.cam.ac.uk>
In-Reply-To: <20100917120837.A72F3C178D9@www2.open-std.org>
References: <20100917110934.5E9C1C178D9@www2.open-std.org>
 <20100917120837.A72F3C178D9@www2.open-std.org>
X-Mailer: Prayer v1.3.3
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset=ISO-8859-1
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

This arose out of the Interoperability and MPI area. None of NAG, gfortran 
or Intel allow me to use an element of an assumed-shape array as an actual 
argument where the dummy is assumed-size. No problem - except that I can't 
find any such restriction in Fortran 2008. In the absence of that, 
12.5.2.11 paragraph 1 is a little ambiguous.

Is there there and I failed to find it, is it a change, or has it dropped
out by accident?

A program that shows the error is:

PROGRAM Main
    INTEGER :: i, j
    INTEGER :: a(9,9)
    DO j = 1,9
        DO i = 1,9
            a(i,j) = 10*j+i
        END DO
    END DO
    CALL Fred(a(5,:))
CONTAINS
    SUBROUTINE Fred (b)
        INTEGER :: b(:)
        PRINT *, b
        CALL Joe(b(1))    ! This is erroneous
    END SUBROUTINE Fred
    SUBROUTINE Joe(c)
        INTEGER :: i
        INTEGER :: c(*)
        DO i = 1,9
            PRINT *, c(i)
        END DO
    END SUBROUTINE Joe
END PROGRAM Main

Regards,
Nick.

