aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/layout.adb
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2020-06-23 12:49:04 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2020-10-16 03:31:15 -0400
commitc7c7dd3a1ded3f8bcdbfb352277246a521108710 (patch)
tree3cee854425c54f59389e7c436adcdaad865cfe96 /gcc/ada/layout.adb
parent429ad0bb0d3dc77e44f95620341da4938d49168e (diff)
downloadgcc-c7c7dd3a1ded3f8bcdbfb352277246a521108710.zip
gcc-c7c7dd3a1ded3f8bcdbfb352277246a521108710.tar.gz
gcc-c7c7dd3a1ded3f8bcdbfb352277246a521108710.tar.bz2
[Ada] Add Max_Integer_Size attribute and couple of helper functions
gcc/ada/ * doc/gnat_rm/implementation_defined_attributes.rst: Document the new Max_Integer_Size attribute. * gnat_rm.texi: Regenerate. * exp_attr.adb (Get_Integer_Type): Call Small_Integer_Type_For. (Expand_N_Attribute_Reference) <Attribute_Pred>: Replace selection code with call to Integer_Type_For. <Attribute_Succ>: Likewise. <Attribute_Val>: Likewise. <Attribute_Valid>: Likewise. <Attribute_Max_Integer_Size>: Raise Program_Error. * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Replace selection code with call to Integer_Type_For. (Simple_Init_Initialize_Scalars_Type): Use Long_Long_Unsigned and System_Max_Integer_Size to size the largest integer type. * exp_pakd.adb (Compute_Linear_Subscript): Minor tweak. (Create_Packed_Array_Impl_Type): Use Small_Integer_Type_For. * exp_util.ads (Integer_Type_For): New function. (Small_Integer_Type_For): Likewise. * exp_util.adb (Adjust_Condition): Use Integer_Type_For. (Component_May_Be_Bit_Aligned): Use System_Max_Integer_Size. (Integer_Type_For): New function. (Small_Integer_Type_For): Likewise. (Matching_Standard_Type): Use Small_Integer_Type_For. (Needs_Constant_Address): Replace 64 with System_Max_Integer_Size. * freeze.adb (Set_Small_Size): Likewise. (Size_Known): Likewise. (Check_Suspicious_Modulus): Likewise. (Check_Large_Modular_Array): Likewise. (Freeze_Entity): Likewise. * layout.adb (Layout_Type): Likewise. * sem_aggr.adb: Add with and use clauses for Ttypes. (Resolve_Aggregate): Replace 64 with System_Max_Integer_Size. * sem_attr.ads (Attribute_Impl_Def): Add Attribute_Max_Integer_Size. * sem_attr.adb (Analyze_Attribute) <Attribute_Max_Integer_Size>: New (Eval_Attribute): Likewise. * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Change max scalar size to System_Max_Integer_Size. (Check_Array_Type): Replace 64 with System_Max_Integer_Size and remove superfluous test. (OK_Component): Likewise. * sem_ch5.adb: Add with and use clauses for Ttypes. (Analyze_Assignment): Replace 64 with System_Max_Integer_Size. * snames.ads-tmpl (Name_Max_Integer_Size): New attribute name. (Attribute_Id): Add Attribute_Max_Integer_Size. * ttypes.ads (System_Max_Integer_Size): New constant.
Diffstat (limited to 'gcc/ada/layout.adb')
-rw-r--r--gcc/ada/layout.adb10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/ada/layout.adb b/gcc/ada/layout.adb
index 73812f6..684fae6 100644
--- a/gcc/ada/layout.adb
+++ b/gcc/ada/layout.adb
@@ -378,12 +378,12 @@ package body Layout is
Init_Esize (E, S);
exit;
- -- If the RM_Size is greater than 64 (happens only when
- -- strange values are specified by the user, then Esize
- -- is simply a copy of RM_Size, it will be further
- -- refined later on)
+ -- If the RM_Size is greater than System_Max_Integer_Size
+ -- (happens only when strange values are specified by the
+ -- user), then Esize is simply a copy of RM_Size, it will
+ -- be further refined later on).
- elsif S = 64 then
+ elsif S = System_Max_Integer_Size then
Set_Esize (E, RM_Size (E));
exit;