diff options
| author | Javier Miranda <miranda@adacore.com> | 2025-11-18 19:53:58 +0000 |
|---|---|---|
| committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2025-12-05 13:22:54 +0100 |
| commit | a99a56a09190ff2a8bb26588e1379077dc0ae9e1 (patch) | |
| tree | 2cfbbbfd05552dc81a61b13d70bf38403d70c3ac /gcc/fortran/expr.cc | |
| parent | b224a5f39c7b762028c5e2bb9d0106fd0ef2af94 (diff) | |
| download | gcc-a99a56a09190ff2a8bb26588e1379077dc0ae9e1.zip gcc-a99a56a09190ff2a8bb26588e1379077dc0ae9e1.tar.gz gcc-a99a56a09190ff2a8bb26588e1379077dc0ae9e1.tar.bz2 | |
ada: Unsigned_Base_Range aspect (part 6)
Revert patch for Is_Modular_Integer_Type and Is_Signed_Integer_Type;
add new synthesized predicates Has_Modular_Operations and
Has_Overflow_Operations, and adjust the frontend sources
to rely on them.
gcc/ada/ChangeLog:
* einfo.ads (Has_Unsigned_Base_Range_Aspect): Update documentation.
(Has_Modular_Operations): New synthesized predicate.
(Has_Overflow_Operations): New synthesized predicate.
* einfo-utils.ads (Has_Modular_Operations): New function.
(Has_Overflow_Operations): New function.
* einfo-utils.adb (Is_Modular_Integer_Type): Undo previous patch.
(Is_Signed_Integer_Type): Undo previous patch.
(Has_Modular_Operations): New function.
(Has_Overflow_Operations): New function.
* checks.adb (Determine_Range): Replace selected occurrences of calls to
Is_Modular_Integer_Type by calls to Has_Modular_Operations, and calls to
Is_Signed_Integer_Type by calls to Has Overflow_Operations.
(Enable_Range_Check): Ditto.
(Insert_Valid_Check): Ditto.
* exp_aggr.adb (Others_Check): Ditto.
* exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Pred,
Attribute_Succ]): Ditto.
* exp_ch4.adb (Expand_Compare_Minimize_Eliminate_Overflow): Ditto.
(Size_In_Storage_Elements): Ditto.
(Expand_N_Op_Abs): Ditto.
(Expand_N_Op_Expon): Ditto.
(Expand_N_Op_Minus): Ditto.
(Expand_N_Op_Multiply): Ditto.
(Expand_N_Op_Subtract): Ditto.
* freeze.adb (Freeze_Entity): Ditto.
* sem_aggr.adb (Report_Null_Array_Constraint_Error): Ditto plus
report specific error for index with unsigned_base_range aspect.
* sem_attr.adb (Check_Modular_Integer_Type): Ditto.
(Analyze_Attribute [Attribute_Pred, Attribute_Succ, Attribute_
Range_Length, Attribute_Small, Attribute_Reduce]): Ditto.
* sem_ch12.adb (Instantiate_Type): Ditto.
(Validate_Formal_Type_Default): Ditto.
* sem_ch13.adb (Valid_Empty): Ditto.
* sem_ch2.adb (Analyze_Integer_Literal): Ditto.
* sem_ch3.adb (Unsigned_Base_Range_Type_Declaration): Set attribute
Has_Unsigned_Base_Range_Aspect on the implicit base, and set Etype
of its first subtype E_Modular_Integer_Subtype.
* sem_ch4.adb (Analyze_Call): Ditto.
* sem_eval.adb (Check_Non_Static_Context_For_Overflow): Ditto.
(Eval_Arithmetic_Op): Ditto.
(Eval_Integer_Literal): Ditto.
(Eval_Logical_Op): Ditto.
(Eval_Op_Expon): Ditto.
(Eval_Op_Not): Ditto.
(Eval_Unary_Op): Ditto.
(Fold_Shift): Ditto.
(Test_Expression_Is_Foldable): Ditto.
* sem_intr.adb (Check_Shift): Ditto.
* sem_prag.adb (Analyze_Pragma [Pragma_Unsigned_Base_Range]): Add
assertion.
* sem_res.adb (Resolve_Logical_Op): Ditto.
(Resolve_Unary_Op): Ditto.
(Set_String_Literal_Subtype): Ditto.
* sem_type.adb (Covers): Ditto.
(Specific_Type): Ditto.
(Valid_Boolean_Arg): Ditto.
* sem_util.adb (Wrong_Type): Ditto
* style.adb (Check_Boolean_Operator): Ditto.
Diffstat (limited to 'gcc/fortran/expr.cc')
0 files changed, 0 insertions, 0 deletions
