diff options
author | Steve Baird <baird@adacore.com> | 2021-10-15 15:23:34 -0700 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-10-25 15:07:21 +0000 |
commit | 1ddc39479b999841e0b0e994a47bf3cec8a4e54e (patch) | |
tree | f5241de8be61a6b3038b7123cd9a077ae642b99a /gcc/tree-vrp.c | |
parent | 8bada6e9751abd00fe9b1bd1d7fcfa073042e4dd (diff) | |
download | gcc-1ddc39479b999841e0b0e994a47bf3cec8a4e54e.zip gcc-1ddc39479b999841e0b0e994a47bf3cec8a4e54e.tar.gz gcc-1ddc39479b999841e0b0e994a47bf3cec8a4e54e.tar.bz2 |
[Ada] Relax INOX restrictions when casing on composite value.
gcc/ada/
* sem_case.adb (Composite_Case_Ops.Box_Value_Required): A new
function which takes a component type and returns a Boolean.
Returns True for the cases which were formerly forbidden as
components (these checks were formerly performed in the
now-deleted procedure
Check_Composite_Case_Selector.Check_Component_Subtype).
(Composite_Case_Ops.Normalized_Case_Expr_Type): Hoist this
function out of the Array_Case_Ops package because it has been
generalized to also do the analogous thing in the case of a
discriminated type.
(Composite_Case_Ops.Scalar_Part_Count): Return 0 if
Box_Value_Required returns True for the given type/subtype.
(Composite_Case_Ops.Choice_Analysis.Choice_Analysis.Component_Bounds_Info.
Traverse_Discrete_Parts): Return without doing anything if
Box_Value_Required returns True for the given type/subtype.
(Composite_Case_Ops.Choice_Analysis.Parse_Choice.Traverse_Choice):
If Box_Value_Required yields True for a given component type,
then check that the value of that component in a choice
expression is indeed a box (in which case the component is
ignored).
* doc/gnat_rm/implementation_defined_pragmas.rst: Update
documentation.
* gnat_rm.texi: Regenerate.
Diffstat (limited to 'gcc/tree-vrp.c')
0 files changed, 0 insertions, 0 deletions