This clause specifies representation pragmas that control the use of shared variables. A volatile type is one to which a pragma Volatile applies. In addition, every atomic type or object is also defined to be volatile. If an atomic object is used as an actual for a generic formal object of mode in out , then the type of the generic formal object shall be atomic. If an atomic type is used as an actual for a generic formal derived type, then the ancestor of the formal type shall be atomic or allow pass by copy.
Corresponding rules apply to volatile objects and types.
For a volatile object all reads and updates of the object as a whole are performed directly to memory. If any subcomponent of a type is atomic or volatile, then the type is defined to be a by-reference type. If an actual parameter is atomic or volatile, and the corresponding formal parameter is not, then the parameter is passed by copy. The implementation shall not generate any memory reads or updates of atomic or volatile objects other than those specified by the program. If a pragma Pack applies to a type any of whose subcomponents are atomic, the implementation shall not pack the atomic subcomponents more tightly than that for which it can support indivisible reads and updates.