From janshep@watson.ibm.com  Thu Nov  2 21:07:51 1995
Received: from watson.ibm.com (watson.ibm.com [129.34.139.4]) by dkuug.dk (8.6.12/8.6.12) with SMTP id VAA08046 for <sc22wg5@dkuug.dk>; Thu, 2 Nov 1995 21:07:50 +0100
Message-Id: <199511022007.VAA08046@dkuug.dk>
Received: from YKTVMV by watson.ibm.com (IBM VM SMTP V2R3) with BSMTP id 1841;
   Thu, 02 Nov 95 15:07:31 EST
Date: Thu, 2 Nov 95 15:07:31 EST
From: "Janice C. Shepherd ((914) 784-6313)" <janshep@watson.ibm.com>
X-Addr: J1-K10, Hawthorne 2
        tieline 863
To: sc22wg5@dkuug.dk
Subject: USE statements

One of the items that needs to be discussed at the meeting next week
(US required comment number 20) has to do with the statement in the standard:
  "If one of the USE statements is without an ONLY qualifier, all
   public entities in the module are accessible and the <rename-lists>
   and <only-lists> are interpreted as a single concatenated
   <rename-list>."
F95 reference: 185:34-36  section 11.3.2

The issue is whether the non-rename items from the ONLY qualified
USE statements are included in the concatenated <rename-list>. An
example is:

       MODULE M
         INTEGER I
       END MODULE

       USE M, ONLY: I
       USE M, J => I
       J = 3
       I = 4
       WRITE(6,*) I, J
       END

So, the issue is whether the I on the USE M, ONLY statement is ignored
because it is not a rename, so can't be concatenated with a <rename-list>
or whether the I is not ignored. Thus are I and J names of distinct
storage or are they names for the same storage (namely the I from Module
M)?

You might want to test your favorite F90 processor prior to coming
to the meeting. This is a Fortran 90 issue as well as a Fortran 95
issue. So far I've observed a split in the implementations

Digital, NAG, Microsoft (based on NAG)
  - all treat "I" and "J" as being the same variable. Thus the module
    variable I is available via the name I and the name J.
  - some argue this was the intent of the committee, but I, for one,
    believe that is not what the standard says.
Cray, EPC and IBM
  - all treat "I" and "J" as distinct. Thus the module variable I is
    only available via the name J. I in the program is a new variable.

Please look at the US require comment number 20, for more information.

Thanks
Janice
