J3/06-221r1 To: J3 From: Aleksandar Donev Subject: C12 - UTI 52 : bits pointer and argument association Date: 16-Aug-2006 --------------------- Unresolved Technical Issue 52 (page 314) notes that allowing the unrestricted association of entities of different type through the use of bits pointers is a fundamental change that has undesirable consequences. Unresolved Technical Issue 53 (page 314) notes that allowing argument association of allocatable entities of different types causes problems for certain implementations (for example, if type information is encoded in the dope vector). Also noted was the possibility that, indirectly, objects of types real and integer might be argument associated, resulting in curdled blood. Reply: The inclusion of the new pointer association capability as part of the bits proposal was mainly for completeness, though there are some convenient uses, like being able to use a bits pool of memory as having different types at different times in the program (as an alternative to space-saving equivalence). However, the associated optimization issues and other consequences appear to outweigh the benefits. Edits are provided to remove this capability for argument association and pointer assignment. In the case of allocatable entities having type-mismatched associations, the dope vector issue is manageable since we require an interface in this case. However, the main interest in mis-matched argument association does not depend on allocatable dummy arguments, so this feature could be removed without significant loss of functionality. Edits are provided to remove this capability. The indirect association of integer and real variables is independent of the pointer or allocatable issues. Instead, it arises from allowing both bits_actual/non-bits_dummy and non-bits_actual/bits_dummy association. If only one was allowed, then the undesirable associations would not occur. The mode of primary interest is the bits dummy, so edits are provided to remove the oppposite case for nonpointer nonallocatable dummy arguments. Edits are also provided to ensure that one cannot perform the undesired pointer association by using argument association and the TARGET attribute. Specifically, if a dummy pointer becomes associated with a bits dummy and the actual is not bits, the pointer becomes undefined upon return from the procedure. These edits are against 06-255. Edits to 06-007: ------ In subclause 7.4.2 Pointer assignment: [163:3] Remove "either". [163:4-5] Remove ", or and shall be bits compatible". [164:21-22] Remove ", or and shall be bits compatible (4.3.1.3)". In subclause 12.5.1.4 Actual arguments associated with dummy data objects: [312:5-6] Replace "type compatible or bits compatible (4.3.1.3) with the associated actual argument" with "type compatible with the associated actual argument or it shall be of type bits and bits compatible with the associated actual argument." [313:5] Remove "either". [313:6-7] Remove "or the actual argument and the dummy argument shall be bits compatible". [314:2] Remove "either". [314:2-3] Remove "or the actual argument and the dummy argument shall be bits compatible". Edits to 06-255: ------ [313:6] After "TARGET attribute" insert: ", or is not type-compatible with the effective argument," [313:11] After "TARGET attribute" insert: "is type-compatible with the effective argument," [313:28] After "TARGET attribute" insert: ", is not type-compatible with the actual argument,"