From owner-sc22wg5@open-std.org  Wed Mar 17 09:19:09 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 08DC8C178DF; Wed, 17 Mar 2010 09:19:09 +0100 (CET)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from ns.nag-j.co.jp (218-42-159-107.cust.bit-drive.ne.jp [218.42.159.107])
	by www2.open-std.org (Postfix) with ESMTP id 1FF84C178D9
	for <sc22wg5@open-std.org>; Wed, 17 Mar 2010 09:19:05 +0100 (CET)
Received: from 218-42-159-108.cust.bit-drive.ne.jp ([218.42.159.108] helo=Marucomputer)
	by ns.nag-j.co.jp with smtp (Exim 4.50)
	id 1NroSs-0000N3-CG
	for sc22wg5@open-std.org; Wed, 17 Mar 2010 17:18:54 +0900
Message-ID: <369D1B0CF1534CCE8FF9F7EB3F117D0E@Marucomputer>
From: "Malcolm Cohen" <malcolm@nag-j.co.jp>
To: "WG5" <sc22wg5@open-std.org>
Subject: What shall we do with the broken feature?
Date: Wed, 17 Mar 2010 17:19:29 +0900
Organization: =?iso-2022-jp?B?GyRCRnxLXBsoQk5BRw==?=
MIME-Version: 1.0
Content-Type: text/plain;
	format=flowed;
	charset="iso-2022-jp";
	reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Mailer: Microsoft Windows Live Mail 14.0.8089.726
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8089.726
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

The facility of being able to pass a null pointer or unallocated allocatable to 
an optional nonpointer nonallocatable dummy argument and have that treated as 
being an absent dummy argument is broken as follows.

(i) All of the optional DIM arguments to the intrinsic functions that change the 
rank are qualified with "The corresponding actual argument shall not be an 
optional dummy argument.".  Previously it was not permitted to pass a null 
pointer here, now it is permitted and gives a runtime-varying rank depending on 
the association status of the pointer.  E.g. PRODUCT(matrix,pointer_to_dim) is 
rank 1 if pointer_to_dim is associated and rank 0 if it is not.  20 functions 
have a prohibition against optional dummy arguments, but in several of those it 
is an unnecessary prohibition so fewer than 20 would be necessarily affected.

(ii) This feature appears to change the results of ASSOCIATED when TARGET is a 
null pointer.  This does not appear on the surface to be fixable other than by 
specifying that the feature does not apply to this particular intrinsic 
function, which might be confusing.

(iii) Minor: The performance of a few intrinsic functions such as MAX when some 
arguments are pointers is adversely affected.

(iv) Nitpick: the description in the Introduction omits the unallocated 
allocatable case.

How should we address the problem?
(1) fix the DIS by deleting the feature (I don't think we have a mandate for 
that though);
(2) fix the DIS by changing the wording;
(2) leave it to be fixed later via interpretation processing (other than the 
nitpick which should be done anyway).

Comments?

Cheers,
-- 
................................Malcolm Cohen, Nihon NAG, Tokyo.
 

