09-194 To: J3 From: Malcolm Cohen Subject: Interp request Date: 2009 April 20 NUMBER: TITLE: SAVE attribute and EQUIVALENCE KEYWORDS: DEFECT TYPE: STATUS: J3 consideration in progress QUESTION: If one object in an EQUIVALENCE set has the SAVE attribute, do all the other objects in the EQUIVALENCE set implicit have the SAVE attribute? This can be detected by the program: SUBROUTINE s1 TYPE T SEQUENCE REAL :: C = 3.0 END TYPE TYPE(t) x,y SAVE x EQUIVALENCE(x,y) x = t(1.0) RETURN ENTRY s2 PRINT *,y ! Does this print 1.0 or 3.0? END PROGRAM show CALL s1 CALL s2 END If Y has the SAVE attribute the program will print 1.0; if not, it will print 3.0 due to the default initialization. ANSWER: Yes, the SAVE attribute propagates through EQUIVALENCE. An edit is supplied to clarify this. EDIT: [97:7+] Insert new paragraph "If any data object in an has the SAVE attribute, all other objects in the implicitly have the SAVE attribute; this may be confirmed by explicit declaration." SUBMITTED BY: Malcolm Cohen. HISTORY: 09-194 m188 Submitted