From owner-sc22wg5@open-std.org  Thu Jul 29 17:41:03 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 B17C8C3BA0E; Thu, 29 Jul 2010 17:41:03 +0200 (CEST)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from mail-vw0-f47.google.com (mail-vw0-f47.google.com [209.85.212.47])
	by www2.open-std.org (Postfix) with ESMTP id F3E96C3BA01
	for <sc22wg5@open-std.org>; Thu, 29 Jul 2010 17:40:59 +0200 (CEST)
Received: by vws13 with SMTP id 13so417214vws.34
        for <sc22wg5@open-std.org>; Thu, 29 Jul 2010 08:40:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:received:date:message-id
         :subject:from:to:content-type;
        bh=ltB14Gf6RJ5vdaPw6HsC9Ne3vwRUT8Zz3NbTB5p6xX8=;
        b=WHy9jwD8mCFBjxz+BG354CnbJvjwQBL6FrwYfUcVSLtSNe0uKWhH5uE/NfrM54rKc/
         LfN/Qb3QvW8Ijlz/iDQTjKI2zC3AegyPHr7BF78kpwMR92izE9bdvCqdJHz002YvJMoC
         J57BLcJMRW0mbQVpHBCsPKuTUNgY+xmmG/bnA=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:date:message-id:subject:from:to:content-type;
        b=lETDOEkXtit8zNDLJt6WRD4CDT09vwT1J7e41aF6q9izVUOf+NGypLcqiu0JAMZT0r
         5G3VlCw/e6LrvuaO5iYCY6cBJHXkGBGSslDsyAE8EbettgIkZenuefuEMoyAz8WidsG7
         fE/fiUTRLIqg0/G4eatvp2CepiDcmtMoCn+3Y=
MIME-Version: 1.0
Received: by 10.220.124.40 with SMTP id s40mr158277vcr.182.1280418058879; Thu, 
	29 Jul 2010 08:40:58 -0700 (PDT)
Received: by 10.220.187.76 with HTTP; Thu, 29 Jul 2010 08:40:58 -0700 (PDT)
Date: Thu, 29 Jul 2010 08:40:58 -0700
Message-ID: <AANLkTi=j5KcHgybsWS6oEVw=1H3aUVzx_7Mkd=O+jxo3@mail.gmail.com>
Subject: Re: Executing a type-bound procedure on a coindexed object
From: "Micki St. James" <mickistjames@gmail.com>
To: sc22wg5@open-std.org
Content-Type: multipart/alternative; boundary=0050450141329042ac048c888f79
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

--0050450141329042ac048c888f79
Content-Type: text/plain; charset=ISO-8859-1

It does look as though what the standard gives with one hand it takes away
with the other.

Am I right to think that C456 requires the passed-object dummy argument to
be polymorphic because
that's the mechanism that lets the actual argument be passed correctly for
all cases where the type-bound procedure is inherited from a distant
parent?

As I recall the discussions from November 2008 when the cited paragraph was
added to 12.5.2.4,
the basic problem with polymorphic actual corresponding to polymorphic dummy
is that the actual might have
allocatable components of arbitrary size and at compile-time there's no
telling how many bytes
would have to be copied from the image where the polymorphic coindexed
object lives to the local storage
where the procedure call is happening.  (That's if you're doing
copyin/copyout I guess.)
So even if the NOTE tells you how to avoid visiting a distant image to find
the dynamic type of the actual argument, that isn't enough to let the
compiler set up the call at compile-time.

Not sure I remembered all this right.

                Micki

--0050450141329042ac048c888f79
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

It does look as though what the standard gives with one hand it takes away =
with the other.<br>=A0<br>Am I right to think that C456 requires the passed=
-object dummy argument to be polymorphic because<br>that&#39;s the mechanis=
m that lets the actual argument be passed correctly for all cases where the=
 type-bound procedure is inherited from a distant parent?=A0 <br>
=A0<br>As I recall the discussions from November 2008 when the cited=A0para=
graph was added to 12.5.2.4,<br>the basic problem with polymorphic actual c=
orresponding to polymorphic dummy is that the actual might have<br>allocata=
ble components of arbitrary size and at compile-time there&#39;s no telling=
 how many bytes <br>
would have to be copied from the image where the polymorphic coindexed obje=
ct lives to the local storage<br>where the procedure call is happening.=A0 =
(That&#39;s if you&#39;re doing copyin/copyout I guess.)<br>So even if the =
NOTE tells you how to avoid visiting a distant image to find<br>
the dynamic type of the actual argument, that isn&#39;t enough to let the c=
ompiler set up the call at compile-time.<br>=A0<br>Not sure I remembered al=
l this right.<br>=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Micki

--0050450141329042ac048c888f79--
