===================================================================
@@ -21556,9 +21556,11 @@
Error_Msg_N ("invalid subtype mark in subtype indication", S);
end case;
- -- Size and Convention are always inherited from the base type
+ -- Size, Alignment, Representation aspects and Convention are always
+ -- inherited from the base type.
Set_Size_Info (Def_Id, (Subtype_Mark_Id));
+ Set_Rep_Info (Def_Id, (Subtype_Mark_Id));
Set_Convention (Def_Id, Convention (Subtype_Mark_Id));
return Def_Id;
===================================================================
@@ -21659,6 +21659,20 @@
end if;
end Set_Referenced_Modified;
+ ------------------
+ -- Set_Rep_Info --
+ ------------------
+
+ procedure Set_Rep_Info (T1, T2 : Entity_Id) is
+ begin
+ Set_Is_Atomic (T1, Is_Atomic (T2));
+ Set_Is_Independent (T1, Is_Independent (T2));
+ Set_Is_Volatile_Full_Access (T1, Is_Volatile_Full_Access (T2));
+ if Is_Base_Type (T1) then
+ Set_Is_Volatile (T1, Is_Volatile (T2));
+ end if;
+ end Set_Rep_Info;
+
----------------------------
-- Set_Scope_Is_Transient --
----------------------------
===================================================================
@@ -2473,6 +2473,12 @@
-- (Referenced_As_LHS if Out_Param is False, Referenced_As_Out_Parameter
-- if Out_Param is True) is set True, and the other flag set False.
+ procedure Set_Rep_Info (T1, T2 : Entity_Id);
+ pragma Inline (Set_Rep_Info);
+ -- Copies the Is_Atomic, Is_Independent and Is_Volatile_Full_Access flags
+ -- from sub(type) entity T2 to (sub)type entity T1, as well as Is_Volatile
+ -- if T1 is a base type.
+
procedure Set_Scope_Is_Transient (V : Boolean := True);
-- Set the flag Is_Transient of the current scope