aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-08-12 08:58:52 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-08-12 08:58:52 +0000
commit13931a38fcab143344c90378c3688d089a4efbec (patch)
tree6807e239f7ce5f0594b5a7f77dc97463476a4a59 /gcc/tree.c
parent68c8d72a1aa31d750ddeb6a0eb3f472f1498a154 (diff)
downloadgcc-13931a38fcab143344c90378c3688d089a4efbec.zip
gcc-13931a38fcab143344c90378c3688d089a4efbec.tar.gz
gcc-13931a38fcab143344c90378c3688d089a4efbec.tar.bz2
[Ada] Fix missing range check for In/Out parameter with -gnatVa
This plugs another small loophole in the front-end which fails to generate a range check for a scalar In/Out parameter when -gnatVa is specified. This also fixes a few more leaks of the Do_Range_Check flag on actual parameters, both in regular and -gnatVa modes, as well as a leak specific to expression function in -gnatp mode. 2019-08-12 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * checks.adb (Insert_Valid_Check): Reset the Do_Range_Check flag on the validated object. * exp_ch6.adb (Add_Call_By_Copy_Code): Reset the Do_Range_Check flag on the actual here, as well as on the Expression if the actual is a N_Type_Conversion node. (Add_Validation_Call_By_Copy_Code): Generate the incoming range check if needed and reset the Do_Range_Check flag on the Expression if the actual is a N_Type_Conversion node. (Expand_Actuals): Do not reset the Do_Range_Check flag here. Generate the incoming range check for In parameters here instead of... (Expand_Call_Helper): ...here. Remove redudant condition. * sem_res.adb (Resolve_Actuals): Use local variable A_Typ and remove obsolete comments. (Resolve_Type_Conversion): Do not force the Do_Range_Check flag on the operand if range checks are suppressed. gcc/testsuite/ * gnat.dg/range_check6.adb: New testcase. From-SVN: r274280
Diffstat (limited to 'gcc/tree.c')
0 files changed, 0 insertions, 0 deletions