diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2020-09-07 18:25:23 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-10-23 04:25:02 -0400 |
commit | b120ca616fc820e352a19523dae34f5c53bfe859 (patch) | |
tree | a1c3cdf69ff403e07cabb282d2f6643041a3bdc9 /gcc/ada/exp_ch8.adb | |
parent | 84a5809c7214d103dd2e7f5c352fd99cb8320bb3 (diff) | |
download | gcc-b120ca616fc820e352a19523dae34f5c53bfe859.zip gcc-b120ca616fc820e352a19523dae34f5c53bfe859.tar.gz gcc-b120ca616fc820e352a19523dae34f5c53bfe859.tar.bz2 |
[Ada] Implement new legality rules introduced in C.6(12) by AI12-0363
gcc/ada/
* doc/gnat_rm/implementation_defined_pragmas.rst (VFA): Remove uage
restrictions in conjunction with Atomic and Aliased.
* gnat_rm.texi: Regenerate.
* aspects.ads (Aspect_Id): Add Aspect_Full_Access_Only.
(Is_Representation_Aspect): Likewise.
(Aspect_Names): Likewise.
(Aspect_Delay): Likewise.
* einfo.ads (Is_Atomic_Or_VFA): Rename into...
(Is_Full_Access): ...this.
(Is_Volatile_Full_Access): Document new usage for Full_Access_Only.
* einfo.adb (Is_Atomic_Or_VFA): Rename into...
(Is_Full_Access): ...this.
* freeze.ads (Is_Atomic_VFA_Aggregate): Rename into...
(Is_Full_Access_Aggregate): ...this.
* freeze.adb (Is_Atomic_VFA_Aggregate): Rename into...
(Is_Full_Access_Aggregate): ...this. Adjust to above renaming.
(Freeze_Array_Type): Likewise.
(Freeze_Entity): Likewise.
* exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Likewise.
(Expand_Record_Aggregate): Likewise.
* exp_ch4.adb (Expand_N_Op_Eq): Likewise.
* exp_ch5.adb (Expand_Assign_Array): Likewise.
* exp_ch8.adb (Evaluation_Required): Likewise.
* layout.adb (Layout_Type): Likewise.
(Set_Composite_Alignment): Likewise.
* sem_aux.ads (Has_Rep_Item): Delete.
* sem_aux.adb (Has_Rep_Item): Likewise.
* sem_attr.adb (Resolve_Attribute) <Attribute_Access>: Implement
new legality rules in C.6(12).
* sem_ch12.adb (Instantiate_Object): Likewise.
* sem_res.adb (Resolve_Actuals): Likewise.
* sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Deal with aspect
Full_Access_Only.
(Check_False_Aspect_For_Derived_Type): Likewise.
(Make_Pragma_From_Boolean_Aspect): Test for the presence of Expr.
Deal with aspect Full_Access_Only.
(Analyze_Aspects_At_Freeze_Point): Likewise.
(Analyze_One_Aspect): Do not set Delay_Required to true even for
Always_Delay boolean aspects if they have no expression. Force
Delay_Required to true for aspect Full_Access_Only in all cases.
Reject aspect Full_Access_Only if not in Ada 2020 mode.
(Check_Aspect_At_End_Of_Declarations): Deal with empty expression.
(Check_Aspect_At_Freeze_Point): Likewise.
(Rep_Item_Entity): Delete.
(Inherit_Aspects_At_Freeze_Point): Align handling for Bit_Order
with that for Scalar_Storage_Order.
* sem_prag.adb (Check_Atomic_VFA): Delete.
(Check_VFA_Conflicts): Likewise.
(Check_Full_Access_Only): New procedure.
(Process_Atomic_Independent_Shared_Volatile): Call to implement
the new legality checks in C.6(8/2) and mark the entity last.
(Analyze_Pragma) <Pragma_Atomic_Components>: Remove obsolete check.
* sem_util.ads (Is_Atomic_Or_VFA_Object): Rename into...
(Is_Full_Access_Object): ...this.
(Is_Subcomponent_Of_Atomic_Object): Rename into...
(Is_Subcomponent_Of_Full_Access_Object): ...this.
* sem_util.adb (Inherit_Rep_Item_Chain): Use Present_In_Rep_Item.
(Is_Atomic_Or_VFA_Object): Rename into...
(Is_Full_Access_Object): ...this.
(Is_Subcomponent_Of_Atomic_Object): Rename into...
(Is_Subcomponent_Of_Full_Access_Object): ...this and adjust.
* snames.ads-tmpl (Name_Full_Access_Only): New name of aspect.
* gcc-interface/decl.c (gnat_to_gnu_entity): Adjust for renaming.
(promote_object_alignment): Likewise.
(gnat_to_gnu_field): Likewise. Rename local variable and use
specific qualifier in error message for Volatile_Full_Access.
* gcc-interface/trans.c (lvalue_required_p): Likewise.
Diffstat (limited to 'gcc/ada/exp_ch8.adb')
-rw-r--r-- | gcc/ada/exp_ch8.adb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch8.adb b/gcc/ada/exp_ch8.adb index 630d62f..9f4c65c 100644 --- a/gcc/ada/exp_ch8.adb +++ b/gcc/ada/exp_ch8.adb @@ -129,7 +129,7 @@ package body Exp_Ch8 is if Is_Packed (Etype (Prefix (Nam))) then return True; - elsif Is_Atomic_Or_VFA_Object (Prefix (Nam)) then + elsif Is_Full_Access_Object (Prefix (Nam)) then return True; else @@ -152,7 +152,7 @@ package body Exp_Ch8 is then return True; - elsif Is_Atomic_Or_VFA_Object (Prefix (Nam)) then + elsif Is_Full_Access_Object (Prefix (Nam)) then return True; else |