From jcownie@dolphinics.com  Thu Jan 30 12:14:38 1997
Received: from mailhost.dircon.co.uk (mailhost.dircon.co.uk [194.112.32.10]) by dkuug.dk (8.6.12/8.6.12) with ESMTP id MAA14516 for <sc22wg5@dkuug.dk>; Thu, 30 Jan 1997 12:13:11 +0100
Received: from jim (gw2-178.pool.dircon.co.uk [194.112.35.178]) by mailhost.dircon.co.uk (8.8.4/8.7.3) with SMTP id LAA05240; Thu, 30 Jan 1997 11:11:11 GMT
Message-Id: <199701301111.LAA05240@mailhost.dircon.co.uk>
Received: from localhost by jim (SMI-8.6) id KAA00746; Thu, 30 Jan 1997 10:09:11 GMT
To: Keith Bierman QED <khb@eng.sun.com>
cc: malcolm@nag.co.uk (Malcolm Cohen), hennecke@rz.uni-karlsruhe.de,
        mpi-bind@mcs.anl.gov, sc22wg5@dkuug.dk
Subject: Re: (SC22WG5.1282) PASS_BY("descriptor") 
In-reply-to: Your message of "Wed, 29 Jan 1997 11:57:05 PST."
             <199701291957.LAA04286@chiba.eng.sun.com> 
Date: Thu, 30 Jan 1997 10:09:10 +0000
From: James Cownie <jcownie@dolphinics.com>


> Note that changing the way this works (dope vs. nondope) breaks
> binary compatibility on a given platform, and impacts other products
> in the environment (e.g. the debugger).

Binary compatibility is *NOT* affected, because this is a new
capability. 

Only new code which is written to use BIND(C), PASS_BY ("descriptor")
would be affected by it. Since such code cannot exist yet there can be
no compatibility problems.

All existing code maintains its current meaning and can compile to
the same binary.

> Always using a dope vector can extract a performance penalty on some
> platforms.

Of course, *AND THAT'S NOT THE PROPOSAL* (sorry for shouting, but both
you and Malcolm have objected on these grounds, and I have never
proposed this, nor would I).

To re-cap the proposal :-

1) Functions with the BIND(C) attribute can have arguments with
   PASS_BY("descriptor"). This and *only* this requires that a
   descriptor be passed. (The format of the descriptor is *not*
   standardised, merely the information which can be extracted from
   it). 

2) On the C side a header file and library exist which provide
   functions for extracting information from a parameter which was
   passed from Fortran with the PASS_BY ("descriptor") attribute.

In a nutshell, that's it.

Things *NOT* proposed :-

1) ANY changes to 
   * current calling conventions, 
   * current dope vectors,
   * the (non-standard) way that Fortran calls C at the moment,
   * the (non-standard) way that C called from Fortran unpicks the
     arguments,
   * existing code,
   * the way that Fortran calls Fortran (I know it's the same as
     calling conventions, but I'll just say it again)

2) Anything which invalidates existing Fortran, C or object files.

This proposal is a compatible extension, it doesn't change the
meaning, or implementation of any existing code.

-- Jim 

James Cownie 
Dolphin Interconnect Solutions
Phone : +44 117 9071438
E-Mail: jcownie@dolphinics.com


