From owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org  Tue Aug 28 16:12:23 2012
Return-Path: <owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org>
X-Original-To: sc22wg5-dom8
Delivered-To: sc22wg5-dom8@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id 32E9B356920; Tue, 28 Aug 2012 16:12:23 +0200 (CEST)
Delivered-To: sc22wg5@open-std.org
Received: from mk-filter-3-a-1.mail.uk.tiscali.com (mk-filter-3-a-1.mail.tiscali.co.uk [212.74.100.54])
	by www.open-std.org (Postfix) with ESMTP id E98B7356906
	for <sc22wg5@open-std.org>; Tue, 28 Aug 2012 16:12:21 +0200 (CEST)
X-Trace: 797584147/mk-filter-3.mail.uk.tiscali.com/B2C/$THROTTLED_DYNAMIC/b2c-CUSTOMER-DYNAMIC-IP/88.104.247.205/None/d.muxworthy@bcs.org.uk
X-SBRS: None
X-RemoteIP: 88.104.247.205
X-IP-MAIL-FROM: d.muxworthy@bcs.org.uk
X-SMTP-AUTH: 
X-Originating-Country: GB/UNITED KINGDOM
X-MUA: Apple Mail (2.1278)
X-IP-BHB: Once
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApIBAP7QPFBYaPfN/2dsb2JhbAANOL4SAQEEchcLRlewF5QUkQFgA5sfjTA
X-IronPort-AV: E=Sophos;i="4.77,842,1336345200"; 
   d="scan'208";a="797584147"
Received: from 88-104-247-205.dynamic.dsl.as9105.com (HELO [192.168.1.2]) ([88.104.247.205])
  by smtp.tiscali.co.uk with ESMTP; 28 Aug 2012 15:12:20 +0100
Content-Type: text/plain; charset=iso-8859-1
Mime-Version: 1.0 (Apple Message framework v1278)
Subject: Re: (SC22WG5.4719) Third WG5 ballot on interpretations
From: David Muxworthy <d.muxworthy@bcs.org.uk>
In-Reply-To: <20120803111404.DC9303568DA@www.open-std.org>
Date: Tue, 28 Aug 2012 15:12:20 +0100
Content-Transfer-Encoding: 7bit
Message-Id: <D2C0D70D-755F-4AAD-A2E3-A79EAC3E97D3@bcs.org.uk>
References: <20120803111404.DC9303568DA@www.open-std.org>
To: sc22wg5@open-std.org
X-Mailer: Apple Mail (2.1278)
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

Herewith my vote.
David


Yes  No Number     Title
-Y-  ---  F03/0017   Dummy procedure pointers and PRESENT
-Y-  ---  F03/0018   Multiple identical specific procedures in
                      type-bound generic interfaces
-Y-  ---  F03/0019   Multiple identical specific procedures in
                      generic interface blocks
-Y-  ---  F03/0021   What kind of token is a stop code?
-Y-  ---  F03/0046   Unlimited polymorphic pointers in
                      common blocks
-Y-  ---  F03/0053   The BIND attribute for C_PTR and C_FUNPTR
---  -N-  F03/0065   Relational equivalence
---  -N-  F03/0084   IEEE_SET_ROUNDING_MODE in a subroutine
-Y-  ---  F03/0096   Can a read statement change the unit value?
-Y-  ---  F03/0103   Restrictions on dummy arguments not present for
                      polymorphic type or parameterized derived type
-Y-  ---  F03/0116   indistinguishable specifics for a generic
                      interface with use association
-Y-  ---  F03/0118   Are lower bounds of assumed-shape arrays assumed?
-Y-  ---  F03/0120   When are parameterized sequence types the same
                      type?
-C-  ---  F03/0121   Precise FP semantics of the REAL intrinsic
-Y-  ---  F08/0004   Is TARGET argument of ASSOCIATED a pointer or
                      nonpointer dummy?
-Y-  ---  F08/0008   IEEE exceptions for intrinsic functions
-Y-  ---  F08/0031   PURE INTENT(OUT) finalization
-Y-  ---  F08/0032   PURE FUNCTION result finalization
-Y-  ---  F08/0038   Are pointless restrictions on DIM arguments
                      intended?
-Y-  ---  F08/0042   SOURCE= questions

-----------------------------------------------------------------------
Reason for No to F03/0065

The interpretation hinges on whether 'values' in F2003 section 7.1.8.5
(and hence F2008 7.1.5.5.2) refers to mathematical values or
computational values.

Provided always that the integrity of parentheses is preserved,
interpretation and evaluation of mathematically equivalent expressions
have been integral to Fortran since its beginning. This concept was
used in compilers in the early 1960s and so was incorporated in F66,
section 6.4.  Both F66 (section 6.2 in descriptive English) and F77
(section 6.3.3 explicitly) state that where e1 and e2 are of different
arithmetic types, the value of
          e1 relop e2 
is the value of
          ((e1) - (e2)) relop 0

F90 section 7.1.7.5 states, in normative text:
      the processor may choose to evaluate the expression 
          I .GT. J 
      where I and J are integer variables, as 
          J - I .LT. 0 
and this is repeated as a note in F95 (7.1.7.5) and in F2003
(7.1.8.5).

In F2008 7.1.5.5.2p2 I would contend that (a) as this parsing takes
place at the syntactic level before any computation has started and
(b) for continuity with earlier standards, not to mention 'the spirit
of Fortran', 'value' should be taken to refer to mathematical values,
not computational values.

As a separate matter, the answer to F03/0065 should not state that
what is essentially normative text dating from F90 is 'erroneous'
without flagging this up as a change in language from F2003 to F2008.

I believe the answer should be that 
         IF( X+3.0 .EQ. 3.0 )...
may be interpreted as 
         IF( X .EQ. 0.0 )...
Arguably
         IF( (X+3.0) .EQ. 3.0 )...
can not be so interpreted since the latter implies that some
computation must be done before the comparison.

Therefore to have no edit is wrong. There should be clarification of
what 'values' means in this context and, if 7.1.5.5.2 is now deemed to
refer to computational values, this change to the long-established
interpretation of mathematical equivalence should be recorded as a
change to the language.
-----------------------------------------------------------------------
Reason for No to F03/0084
I agree with John's vote.
-----------------------------------------------------------------------
Reason for comment on F03/0121
Like Van, I find the Answer unsatisfactory although the outcome (no
edit) is correct.  The answer is Yes.  This is stated clearly in
13.7.138.  What a processor might or might not do behind the scenes is
irrelevant.  If it does not obey 13.7.138 it is non-standard-
conforming.  (We are talking about a high-level language, not C).
-----------------------------------------------------------------------




