12-172 To: J3 From: Van Snyder Subject: Interpretation concerning type parameter default expressions Date: 2012 October 05 ---------------------------------------------------------------------- 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 s and the s in their s." SUBMITTED BY: Van Snyder HISTORY: 12-xxx m199 F08/xxxx submitted ----------------------------------------------------------------------