(j3.2006) Paper for 199

Van Snyder Van.Snyder
Mon Oct 1 23:10:10 EDT 2012


I tried to send a paper to the server.  The server claimed to have
uploaded it, but didn't assign a paper number, and it didn't show up
under the "Documents submitted for this meeting" link.  The paper is an
interpretation request concerning circular dependence among expressions
that provide default values for kind type parameters.

It's attached.  Maybe it will eventually reach the server, or at least
get a 12-xxx number.

Van

-------------- next part --------------
                                                                12-xxx
To: J3
From: Van Snyder
Subject: Interpretation concerning type parameter default expressions
Date: 24 September 2012

----------------------------------------------------------------------

NUMBER: F08/xxxx
TITLE: Type parameter default expressions allow circular dependence
KEYWORDS: type parameter expressions, circular dependence
DEFECT TYPE: Erratum
STATUS: Under J3 consideration

QUESTIONS:

Consider

  type :: T ( I, J )
    integer, kind :: I = J + 1
    integer, kind :: J = I + 1
  end type T

  type(t) :: X(1,2)
  print *, x%i, x%j

  end

1. Is the program standard conforming?

2. What does it print?

ANSWERS:

1. The program is not conformant because the standard does not establish
an interpretation.

An edit is supplied to make it clear that the program is not comformant.

2. The standard does not establish an interpretation.

EDITS:

Replace item (9) in the list in 7.1.12p1 [12-007:152:9]:

(9) "a previously declared kind type parameter of the type being defined,"

ALTERNATIVE EDITS:

Insert a constraint on R431 in subclause 4.5.3.1 [12-007:64:9+]:

"C438a (R431) Within a derived type definition, there shall not be a
       circular dependence involving <type-param-name>s and the
       <scalar-int-constant-expr>s in their <type-param-decl>s."

SUBMITTED BY: Van Snyder

HISTORY: 12-xxx    m199  F08/xxxx submitted

----------------------------------------------------------------------



More information about the J3 mailing list