From owner-sc22wg5@open-std.org  Fri Jul 30 18:07:54 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 12FADC3BA11; Fri, 30 Jul 2010 18:07:54 +0200 (CEST)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from mailrelay1.lrz-muenchen.de (mailrelay1.lrz-muenchen.de [129.187.254.106])
	by www2.open-std.org (Postfix) with ESMTP id 71ABEC3BA0E
	for <sc22wg5@open-std.org>; Fri, 30 Jul 2010 18:07:52 +0200 (CEST)
Received: from webmail.lrz-muenchen.de ([129.187.254.85] [129.187.254.85]) by mailout.lrz-muenchen.de with ESMTP; Fri, 30 Jul 2010 18:07:22 +0200
Received: from p5de96cb1.dip.t-dialin.net ([93.233.108.177])
        (SquirrelMail authenticated user a2832ba)
        by webmail.lrz-muenchen.de with HTTP;
        Fri, 30 Jul 2010 18:07:22 +0200 (CEST)
Message-Id: <56613.93.233.108.177.1280506042.squirrel@webmail.lrz-muenchen.de>
In-Reply-To: <20100730154302.65455C3BA0E@www2.open-std.org>
References: <20100729154103.E2BD3C3BA01@www2.open-std.org>
    <4C51AC7D.2000805@lrz.de>
    <20100730154302.65455C3BA0E@www2.open-std.org>
Date: Fri, 30 Jul 2010 18:07:22 +0200 (CEST)
Subject: Re: (SC22WG5.4308) (j3.2006) Executing a type-bound procedure on a 
     coindexed object
From: Reinhold.Bader@lrz.de
To: "SC22WG5" <sc22wg5@open-std.org>
Cc: "J3" <j3@j3-fortran.org>
User-Agent: SquirrelMail/1.4.13
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

> Reinhold Bader wrote:
>>  This does not seem to make sense. The case you mention can also happen
>>   in a non-polymorphic scenario, but there are no restrictions there.
> Which is a hint that the size of the allocatable components is not the
> issue. There are restrictions to ensure that the sizes match so that
> remote reallocation never happens. The issue, as I recall, was that
> there could be other components of unknown types, shapes, etc.

Which should be sufficiently covered by constraint C617 (6.4.2) together
with the definition of coindexed object R614 (6.4.3), unless your "etc."
refers to dragons not covered by this. The constraint is in some sense
much broader, since it does not only refer to argument passing, however it
is not in contradiction with the NOTE (non-polymorphic subobjects are
fine).

> In a
> heterogeneous environment, copying such things may be harder than just
> getting an integer size of an allocatable array.
> In general, it is likely it is all implementable even without some of
> the restrictions, but someone asked to add a restriction to facilitate
> implementation, and we listened unless it took away what was seen as a
> critical functionality. Polymorphic coarrays were not in general seen as
> "critical" :-)

I agree. But in this case there does appear to be an inconsistency in the
standard, at least with respect to what was intended (I think :-)). The
way out would be to either drop the additional restriction, or to prohibit
TBP calls on polymorphic coindexed objects altogether.

Regards
Reinhold

> Best,
> Aleks
>
> --
> Aleksandar Donev
> Assistant Professor of Mathematics
> Courant Institute of Mathematical Sciences, New York University
> E-mail: donev@courant.nyu.edu
> Phone: (510) 910-0891
> Address: 251 Mercer St, New York, NY 10012
> Web: http://cims.nyu.edu/~donev/
>
>


