diff options
author | Steve Baird <baird@adacore.com> | 2021-08-12 16:55:36 -0700 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-10-01 06:13:39 +0000 |
commit | e02c8dffe35f2763ec42a4ca5b2cf1af11f8e5d6 (patch) | |
tree | 209c121d9f5ff39ec2a959de3bba42f8f63402dd /gcc/fortran/trans-openmp.c | |
parent | f5d4b3fbf62a4c49d5951fc7848127af32876b78 (diff) | |
download | gcc-e02c8dffe35f2763ec42a4ca5b2cf1af11f8e5d6.zip gcc-e02c8dffe35f2763ec42a4ca5b2cf1af11f8e5d6.tar.gz gcc-e02c8dffe35f2763ec42a4ca5b2cf1af11f8e5d6.tar.bz2 |
[Ada] Improved checking for invalid index values when accessing array elements
gcc/ada/
* checks.ads: Define a type Dimension_Set. Add an out-mode
parameter of this new type to Generate_Index_Checks so that
callers can know for which dimensions a check was generated. Add
an in-mode parameter of this new type to
Apply_Subscript_Validity_Checks so that callers can indicate
that no check is needed for certain dimensions.
* checks.adb (Generate_Index_Checks): Implement new
Checks_Generated parameter.
(Apply_Subscript_Validity_Checks): Implement new No_Check_Needed
parameter.
* exp_ch4.adb (Expand_N_Indexed_Component): Call
Apply_Subscript_Validity_Checks in more cases than before. This
includes declaring two new local functions,
(Is_Renamed_Variable_Name,
Type_Requires_Subscript_Validity_Checks_For_Reads): To help in
deciding whether to call Apply_Subscript_Validity_Checks.
Adjust to parameter profile changes in Generate_Index_Checks and
Apply_Subscript_Validity_Checks.
Diffstat (limited to 'gcc/fortran/trans-openmp.c')
0 files changed, 0 insertions, 0 deletions